queryDeleteColumn

Deletes a column within a query object.

queryDeleteColumn(query, column) → returns array

Member Function Syntax

query.deleteColumn(column)

queryDeleteColumn Argument Reference

query query
Required

Query to modify

column string
Required

Name of the column to delete

Examples sample code invoking the queryDeleteColumn function

Builds a simple query and removes the 'id' column.

news = queryNew("id,title", "integer,varchar", [ {"id":1,"title":"Dewey defeats Truman"}, {"id":2,"title":"Man walks on Moon"} ]);
queryDeleteColumn(news, 'id');
writeOutput(serializeJSON(news));

Expected Result: {"COLUMNS":["TITLE"],"DATA":[["Dewey defeats Truman"],["Man walks on Moon"]]}


Fork me on GitHub