Files
svc-api-x/v1/taffy/examples/api_callback/resources/dateCollection.cfc
T
2024-10-23 11:17:42 +03:00

17 lines
576 B
Plaintext

<cfcomponent extends="taffy.core.resource" taffy:uri="/date" hint="Collection of dates">
<cffunction name="get" access="public" output="false" hint="Get some collection of dates">
<cfset var qry = queryNew("id,foo", "integer,date") />
<cfset var i = 0 />
<cfloop from="1" to="15" index="i">
<cfset tmp = queryAddRow(qry) />
<cfset tmp = querySetCell(qry, "id", i) />
<cfset tmp = querySetCell(qry, "foo", dateadd("s",RandRange(1, 5000),now())) />
</cfloop>
<cfreturn representationOf(queryToArray(qry)).withStatus(200) />
</cffunction>
</cfcomponent>