<cfsetting showdebugoutput="false">
<cfsetting enablecfoutputonly="true">
<cfcontent type="application/json; charset=utf-8" reset="true">

<cfscript>
qDesc = queryTimed("SHOW COLUMNS FROM Items", {}, { datasource: "payfrit" });

cols = [];
for (row in qDesc) {
  arrayAppend(cols, {
    "Field": row.Field,
    "Type": row.Type,
    "Null": row.Null,
    "Default": row.Default
  });
}

writeOutput(serializeJSON({ "OK": true, "Columns": cols }));
</cfscript>
