This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<cfscript> | |
var value = nullValue(); | |
writeDump(value, "dd mmmm") & ", " & timeFormat(value, "hh:mm tt")); | |
</cfscript> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<cfscript> | |
var value = nullValue(); | |
writeDump(value, "dd mmmm") & ", " & timeFormat(value, "hh:mm tt")); | |
</cfscript> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<cfscript> | |
writedump( server.lucee.version ) | |
dump("parseing against explicit UTC"); | |
dump(label:"2024-04-11T15:28:37 == UTC", var:ParseDateTime(date:'2024-04-11T15:28:37',timezone:"UTC") ); // local TZ | |
dump(label:"2024-04-11T15:28:37.9663866 == UTC", var:ParseDateTime(date:'2024-04-11T15:28:37.9663866',timezone:"UTC") ); // local TZ | |
dump(label:"2024-04-11T15:28:37.9663866Z == UTC", var:ParseDateTime(date:'2024-04-11T15:28:37.9663866Z',timezone:"UTC") ); // UTC TZ (Z=Zulu Time) | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<cfscript> | |
public array function queryToArrayOfStructs( required any q ) { | |
try { | |
var queryColumns = getMetadata( arguments.q ).map( function( item ) { | |
return item.name; | |
} ); | |
} catch ( any e ) { | |
writeDump( var = arguments ); | |
rethrow; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<cfscript> | |
public array function queryToArrayOfStructs( required any q ) { | |
try { | |
var queryColumns = getMetadata( arguments.q ).map( function( item ) { | |
return item.name; | |
} ); | |
} catch ( any e ) { | |
writeDump( var = arguments ); | |
rethrow; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<cfscript> | |
public array function queryToArrayOfStructs( required any q ) { | |
try { | |
var queryColumns = getMetadata( arguments.q ).map( function( item ) { | |
return item.name; | |
} ); | |
} catch ( any e ) { | |
writeDump( var = arguments ); | |
rethrow; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<cfscript> | |
numbersAsQuery = queryNew("id,en,mi", "integer,varchar,varchar", [ | |
[1,"one","tahi"], | |
[2,"two","rua"], | |
[3,"three","toru"], | |
[4,"four","wha"] | |
]) | |
</cfscript> | |
<cfquery name="numbersAsArray" dbtype="query" returntype="array"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<cfset myArray = ['anError', 'noError'] > | |
<cfoutput><h1>Original version</h1></cfoutput> | |
<!-- throw errors --> | |
<cfloop array="#myArray#" item='doError'> | |
<cftry> | |
<cfoutput> | |
<br /> | |
#doError# | |
</cfoutput> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<cfscript> | |
var abc = 123; | |
writedump(abc); | |
</cfscript> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<cfscript> | |
function ConvertEmptyStringKeyValueToNull(data) { | |
if (isStruct(arguments.data)) { | |
for (local.key in arguments.data) { | |
arguments.data[local.key] = ConvertEmptyStringKeyValueToNull(arguments.data[local.key]); | |
} | |
} else if (isArray(arguments.data)) { | |
for (local.i = 1; local.i <= arrayLen(arguments.data); local.i++) { | |
arguments.data[local.i] = ConvertEmptyStringKeyValueToNull(arguments.data[local.i]); | |
} |
NewerOlder