Skip to content

WIP: BoxLang Prime Compatibility #606

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 9 commits into
base: development
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion server-boxlang-cfml@1.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"JVM":{
"heapSize":"1024",
"javaVersion":"openjdk21_jre",
"args":"-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=9999"
"args":"-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=9998"
},
"cfconfig":{
"file":".cfconfig.json"
Expand Down
3 changes: 1 addition & 2 deletions server-boxlang-cfml@be.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@
},
"JVM":{
"heapSize":"1024",
"javaVersion":"openjdk21_jre",
"args":"-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=9999"
"javaVersion":"openjdk21_jre"
},
"cfconfig":{
"file":".cfconfig.json"
Expand Down
4 changes: 3 additions & 1 deletion server-boxlang@1.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
},
"JVM":{
"heapSize":"768",
"javaVersion":"openjdk21_jre",
"args":"-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=9999"
},
"cfconfig":{
Expand All @@ -30,5 +31,6 @@
},
"scripts":{
"onServerInitialInstall":"install bx-mail,bx-pdf,bx-mysql,bx-esapi,bx-orm@be --noSave"
}
},
"conosole":true
}
14 changes: 7 additions & 7 deletions system/async/tasks/ScheduledTask.cfc
Original file line number Diff line number Diff line change
Expand Up @@ -464,29 +464,29 @@ component accessors="true" {
/**
* Set when this task should start execution on. By default it starts automatically.
*
* @date The date when this task should start execution on => yyyy-mm-dd format is preferred.
* @date The date when this task should start execution on => yyyy-MM-dd format is preferred.
* @time The specific time using 24 hour format => HH:mm, defaults to 00:00
*/
ScheduledTask function startOn( required date, string time = "00:00" ){
debugLog( "startOn", arguments );

variables.startOnDateTime = variables.dateTimeHelper.parse(
"#dateFormat( arguments.date, "yyyy-mm-dd" )#T#arguments.time#"
"#dateFormat( arguments.date, "yyyy-MM-dd" )#T#arguments.time#"
);
return this;
}

/**
* Set when this task should stop execution on. By default it never ends
*
* @date The date when this task should stop execution on => yyyy-mm-dd format is preferred.
* @date The date when this task should stop execution on => yyyy-MM-dd format is preferred.
* @time The specific time using 24 hour format => HH:mm, defaults to 00:00
*/
ScheduledTask function endOn( required date, string time = "00:00" ){
debugLog( "endOn", arguments );

variables.endOnDateTime = variables.dateTimeHelper.parse(
"#dateFormat( arguments.date, "yyyy-mm-dd" )#T#arguments.time#"
"#dateFormat( arguments.date, "yyyy-MM-dd" )#T#arguments.time#"
);
return this;
}
Expand Down Expand Up @@ -648,12 +648,12 @@ component accessors="true" {
len( variables.endTime )
) {
var _startTime = variables.dateTimeHelper.parse(
dateFormat( getJavaNow().toString(), "yyyy-mm-dd" ) & "T" & (
dateFormat( getJavaNow().toString(), "yyyy-MM-dd" ) & "T" & (
len( variables.startTime ) ? variables.startTime : "00:00:00"
)
);
var _endTime = variables.dateTimeHelper.parse(
dateFormat( getJavaNow().toString(), "yyyy-mm-dd" ) & "T" & (
dateFormat( getJavaNow().toString(), "yyyy-MM-dd" ) & "T" & (
len( variables.endTime ) ? variables.endTime : "23:59:59"
)
);
Expand Down Expand Up @@ -1662,7 +1662,7 @@ component accessors="true" {
function debugLog( required string caller, struct args = {} ){
if ( variables.debug ) {
var message = [
dateTimeFormat( now(), "yyyy-mm-dd hh:nn:ss" ),
dateTimeFormat( now(), "yyyy-MM-dd hh:mm:ss" ),
"ScheduledTask",
"group: #getGroup()#",
"name: #getName()#",
Expand Down
4 changes: 2 additions & 2 deletions system/cache/report/skins/default/CacheContentReport.cfm
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,14 @@
<!--- Created --->
<td align="center" >
<cfif !isNull( cacheMetadata[thisKey][ cacheMDKeyLookup.Created ] )>
#dateformat( cacheMetadata[thisKey][ cacheMDKeyLookup.Created ], "mmm-dd" )# <br/>
#dateformat( cacheMetadata[thisKey][ cacheMDKeyLookup.Created ], "MMM-dd" )# <br/>
#timeformat( cacheMetadata[thisKey][ cacheMDKeyLookup.created ], "hh:mm:ss tt" )#
</cfif>
</td>
<!--- Last Accessed --->
<td align="center">
<cfif !isNull( cacheMetadata[thisKey][ cacheMDKeyLookup.LastAccessed ] )>
#dateformat(cacheMetadata[thisKey][ cacheMDKeyLookup.LastAccessed ],"mmm-dd")# <br/>
#dateformat(cacheMetadata[thisKey][ cacheMDKeyLookup.LastAccessed ],"MMM-dd")# <br/>
#timeformat(cacheMetadata[thisKey][ cacheMDKeyLookup.LastAccessed ],"hh:mm:ss tt")#
</cfif>
</td>
Expand Down
2 changes: 1 addition & 1 deletion system/cache/report/skins/default/CacheReport.cfm
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
Last Reap
</div>
<div class="cachebox_debugContentCell">
#DateFormat(cacheStats.getlastReapDatetime(),"mmm-dd-yyyy")#
#DateFormat(cacheStats.getlastReapDatetime(),"MMM-dd-yyyy")#
#TimeFormat(cacheStats.getlastReapDatetime(),"hh:mm:ss tt")#
</div>
</cfif>
Expand Down
120 changes: 99 additions & 21 deletions system/cache/store/JDBCStore.cfc
Original file line number Diff line number Diff line change
Expand Up @@ -237,9 +237,21 @@ component implements="coldbox.system.cache.store.IObjectStore" accessors="true"
var qStats = queryExecute(
"#targetSQL#",
{
lastAccessed : { value : "#now()#", cfsqltype : "timestamp" },
id : { value : "#normalizedID#", cfsqltype : "varchar" },
created : { value : "#now()#", cfsqltype : "timestamp" }
lastAccessed : {
value : "#now()#",
cfsqltype : "timestamp",
sqltype : "timestamp"
},
id : {
value : "#normalizedID#",
cfsqltype : "varchar",
sqltype : "varchar"
},
created : {
value : "#now()#",
cfsqltype : "timestamp",
sqltype : "timestamp"
}
},
variables.queryOptions
);
Expand Down Expand Up @@ -360,18 +372,51 @@ component implements="coldbox.system.cache.store.IObjectStore" accessors="true"
)
",
{
id : { value : "#normalizedId#", cfsqltype : "varchar" },
objectKey : { value : "#arguments.objectKey#", cfsqltype : "varchar" },
objectValue : { value : "#arguments.object#", cfsqltype : "longvarchar" },
hits : { value : "1", cfsqltype : "integer" },
timeout : { value : "#arguments.timeout#", cfsqltype : "integer" },
id : {
value : "#normalizedId#",
cfsqltype : "varchar",
sqltype : "varchar"
},
objectKey : {
value : "#arguments.objectKey#",
cfsqltype : "varchar",
sqltype : "varchar"
},
objectValue : {
value : "#arguments.object#",
cfsqltype : "longvarchar",
sqltype : "longvarchar"
},
hits : {
value : "1",
cfsqltype : "integer",
sqltype : "integer"
},
timeout : {
value : "#arguments.timeout#",
cfsqltype : "integer",
sqltype : "integer"
},
lastAccessTimeout : {
value : "#arguments.lastAccessTimeout#",
cfsqltype : "integer"
cfsqltype : "integer",
sqltype : "integer"
},
now : {
value : now(),
cfsqltype : "timestamp",
sqltype : "timestamp"
},
now : { value : now(), cfsqltype : "timestamp" },
isExpired : { value : "0", cfsqltype : "bit" },
isSimple : { value : "#isSimple#", cfsqltype : "bit" }
isExpired : {
value : "0",
cfsqltype : "bit",
sqltype : "bit"
},
isSimple : {
value : "#isSimple#",
cfsqltype : "bit",
sqltype : "bit"
}
},
variables.queryOptions
);
Expand All @@ -393,18 +438,51 @@ component implements="coldbox.system.cache.store.IObjectStore" accessors="true"
WHERE id = :id
",
{
id : { value : "#normalizedId#", cfsqltype : "varchar" },
objectKey : { value : "#arguments.objectKey#", cfsqltype : "varchar" },
objectValue : { value : "#arguments.object#", cfsqltype : "longvarchar" },
hits : { value : "1", cfsqltype : "integer" },
timeout : { value : "#arguments.timeout#", cfsqltype : "integer" },
id : {
value : "#normalizedId#",
cfsqltype : "varchar",
sqltype : "varchar"
},
objectKey : {
value : "#arguments.objectKey#",
cfsqltype : "varchar",
sqltype : "varchar"
},
objectValue : {
value : "#arguments.object#",
cfsqltype : "longvarchar",
sqltype : "longvarchar"
},
hits : {
value : "1",
cfsqltype : "integer",
sqltype : "integer"
},
timeout : {
value : "#arguments.timeout#",
cfsqltype : "integer",
sqltype : "integer"
},
lastAccessTimeout : {
value : "#arguments.lastAccessTimeout#",
cfsqltype : "integer"
cfsqltype : "integer",
sqltype : "integer"
},
now : {
value : now(),
cfsqltype : "timestamp",
sqltype : "timestamp"
},
isExpired : {
value : "0",
cfsqltype : "bit",
sqltype : "bit"
},
now : { value : now(), cfsqltype : "timestamp" },
isExpired : { value : "0", cfsqltype : "bit" },
isSimple : { value : "#isSimple#", cfsqltype : "bit" }
isSimple : {
value : "#isSimple#",
cfsqltype : "bit",
sqltype : "bit"
}
},
variables.queryOptions
);
Expand Down
16 changes: 0 additions & 16 deletions system/core/database/SchemaInfo.cfc
Original file line number Diff line number Diff line change
Expand Up @@ -188,20 +188,4 @@ component singleton {
}
}

/**
* Get the query param type for a specific datasource for a date/time column
*
* @dsn The datasource name
* @username The username to use
* @password The password to use
* @deprecated There are no longer any instances where this would be different between engines. Deprecate in 7.x and remove in 8x.
*/
public string function getQueryParamDateTimeType(
required string dsn,
username = "",
password = ""
){
return "cf_sql_timestamp";
}

}
2 changes: 2 additions & 0 deletions system/core/dynamic/ObjectPopulator.cfc
Original file line number Diff line number Diff line change
Expand Up @@ -569,6 +569,8 @@ component accessors="true" singleton {
var annotations = server.keyExists( "boxlang" ) ? getClassMetadata(
arguments.relationalMeta.properties[ key ].cfc
).annotations : getComponentMetadata( arguments.relationalMeta.properties[ key ].cfc );

// Verify if the entityName annotation exists
if ( annotations.keyExists( "entityName" ) ) {
targetEntityName = annotations.entityName;
}
Expand Down
6 changes: 4 additions & 2 deletions system/core/events/EventPoolManager.cfc
Original file line number Diff line number Diff line change
Expand Up @@ -228,9 +228,11 @@ component accessors="true" {

// Start Registering inheritances?
if (
structKeyExists( arguments.metadata, "extends" )
arguments.metadata.keyExists( "extends" )
AND
NOT listFindNoCase( getStopRecursionClasses(), arguments.metadata.extends.name )
!arguments.metadata.extends.isEmpty()
AND
!listFindNoCase( getStopRecursionClasses(), arguments.metadata.extends.name )
) {
parseMetadata( arguments.metadata.extends, arguments.eventsFound );
}
Expand Down
11 changes: 7 additions & 4 deletions system/core/util/Util.cfc
Original file line number Diff line number Diff line change
Expand Up @@ -416,15 +416,18 @@ component {
if ( isObject( arguments.component ) ) {
arguments.md = getMetadata( arguments.component );
} else {
arguments.md = getComponentMetadata( arguments.component );
arguments.md = server.keyExists( "boxlang" ) ?
getClassMetadata( arguments.component ) :
getComponentMetadata( arguments.component );
}
}

// If it has a parent, stop and calculate it first, unless of course, we've reached a class we shouldn't recurse into.
if (
structKeyExists( arguments.md, "extends" ) &&
arguments.md.type eq "component" &&
stopClassRecursion( md.extends.name, arguments.stopRecursions ) EQ FALSE
arguments.md.keyExists( "extends" ) AND
!arguments.md.extends.isEmpty() AND
listFindNoCase( "class,component", arguments.md.extends.type ) AND
!stopClassRecursion( arguments.md.extends.name, arguments.stopRecursions )
) {
loc.parent = getInheritedMetaData(
component = arguments.component,
Expand Down
4 changes: 2 additions & 2 deletions system/exceptions/BugReport.cfm
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ A reporting template about exceptions in your ColdBox Apps
</cfif>
<tr>
<td align="right" class="info"><strong>Timestamp: </strong></td>
<td>#dateformat(now(), "mm/dd/yyyy")# #timeformat(now(),"hh:mm:ss tt")#</td>
<td>#dateformat(now(), "MM/dd/yyyy")# #timeformat(now(),"hh:mm:ss tt")#</td>
</tr>
<tr >
<th colspan="2" >Event Details:</th>
Expand Down Expand Up @@ -155,7 +155,7 @@ A reporting template about exceptions in your ColdBox Apps
<table class="table" align="center">
<tr>
<td align="right" class="info">Bug Date:</td>
<td >#dateformat(now(), "mm/dd/yyyy")# #timeformat(now(),"hh:mm:ss tt")#</td>
<td >#dateformat(now(), "MM/dd/yyyy")# #timeformat(now(),"hh:mm:ss tt")#</td>
</tr>

<tr>
Expand Down
2 changes: 1 addition & 1 deletion system/exceptions/Whoops.cfm
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@

<h1 class="exception__timestamp" title="Time of exception">
<i data-eva="clock-outline" fill="##7fcbe2"></i>
<span>#dateTimeFormat( now(), "mm/dd/yyyy hh:nn tt" )#</span>
<span>#dateTimeFormat( now(), "MMM/dd/yyyy HH:mm:ss" )#</span>
</h1>

<h1 class="exception__type" title="Error Code and Exception Type">
Expand Down
Loading
Loading