This function takes a query, removes all the rows, then returns a query object with no records
queryClear(query)
returns query
query.clear()
Name | Type | Required | Default | Description |
---|---|---|---|---|
query | query | Yes |
Description of the code example
heroes = queryNew("id,Name",
"integer,varchar",
[
{"id":1,"Name":"Bruce Banner"},
{"id":2,"Name":"Tony Stark"},
{"id":3,"Name":"Bobby Drake"},
{"id":4,"Name":"Jean Grey"}
]
);
writeOutput("Query with records<br />");
writeDump(heroes);
writeOutput("The same query, but cleared<br />");
writeDump(heroes.clear());