sebtools / com.sebtools Goto Github PK
View Code? Open in Web Editor NEWThe com.sebtools package
Home Page: http://www.bryantwebconsulting.com/docs/com-sebtools/
The com.sebtools package
Home Page: http://www.bryantwebconsulting.com/docs/com-sebtools/
I upgraded to this version available at Github and multiple CFCs appear to require custom tags that don't exist in this project:
I found a blog entry that referenced these files, but the link was to the riaForge website which isn't around anymore.
Just tried to upgrade to latest version on github (as of 3/19/21).
Getting an error when running a simple getRecords request when there is a Related List field.
Old SQL Output (version from 4/3/2020):
SELECT [Users].[userID] , ( CAST( [Users].[userID] AS varchar(500)) ) AS [roleNames] FROM [Users] WHERE 1 = 1 AND [Users].[userID] = 10
New SQL Output (version from 3/19/2021):
SELECT [Users].[userID] , ( STUFF ( ( SELECT ',' + CONVERT( nvarchar(20), ) FROM [roles] INNER JOIN [Users_Roles] jt ON = WHERE 1 = 1 AND = ORDER BY FOR XML PATH('') ) ,1,1,'') ) AS [roleNames] FROM [Users] WHERE 1 = 1 AND [Users].[userID] = (10)
which generates the following error: " Incorrect syntax near ')'. "
Was looking for new documentation to see if I could debug, but it seems there have been a bunch of commits, but the Docs for DataMGR haven't been updated in quite a while, so I don't really know where to start here.
Any ideas?
If I need to return a result set that has a relation field (in this case a label), and that table is sorted by that relation field, the query returns properly if the offset is zero. But if the offset is >0, it returns an error that the relation field cannot be found.
The following code returns a proper query for contracts 1 and throws an error for contract2. In this table, the companyName field is a label relation.
I've found a workaround using OFFSET / FETCH, which is supported in MSSQL2012 and newer. See the next post.
queryArgs = {
data: {
status: 37
},
tablename: "AQS_Contracts",
fieldlist: "AQSCONTRACTID,ContractNbr,companyName,status,statusDesc",
filters:[],
maxrows:15,
offset:0,
orderBy: "companyName ASC",
qryFormat: "array"
}
contracts1 = application.obj.DataMgr.getRecords(argumentCollection=queryArgs);
dump(contracts1);
writeOutput("<br><br>");
queryArgs = {
data: {
status: 37
},
tablename: "AQS_Contracts",
fieldlist: "AQSCONTRACTID,ContractNbr,companyName,status,statusDesc",
filters:[],
maxrows:15,
offset:15,
orderBy: "companyName ASC",
qryFormat: "array"
}
contracts2 = application.obj.DataMgr.getRecords(argumentCollection=queryArgs);
dump(contracts2);
I've been using DataMGR for over 10 years....and am having some issues with it and was hoping for some help. See the following code:
start=getTickCount();
runSQLResult = application.obj.DataMgr.runSQL("UPDATE AQS_Solicitations SET status = 73 WHERE solicitationNbr = 'SPE7L120T042C'");
dump("runSQL Method: #getTickCount()-start#ms");
start=getTickCount();
saveSolicitationResult = application.obj.DataMgr.updateRecord(tablename="AQS_Solicitations",fieldList="status",data={status:'73', solicitationNbr:'SPE7L120T042C', solicitationLineNbr:1});
dump("Save Method: #getTickCount()-start#ms");
Using the runSQL method, this save takes 63ms. Using the updateRecord method, it takes 3281ms, which is over 3 seconds. I know there will be a little overhead, but this seems totally off.
and if I run it through the debugger, the generated SQL code is nearly identical.
Any thoughts?
Getting this error on Lucee 5.2.2.71 when I run a any query. Thanks
Incorrect syntax near 'productversion'.
SQL | SELECT SERVERPROPERTY(''productversion'') AS VersionNum
DatabaseName | Microsoft SQL Server
DatabaseVersion | 12.00.2269
DriverName | Microsoft JDBC Driver 4.0 for SQL Server
DriverVersion | 4.0.4621.201
The Error Occurred in
C:\xampp\htdocs\system\datamgr_DataMgr.cfc: line 3331
3329:
3330: <cfif Len(arguments.sql)>
3331: #Trim(PreserveSingleQuotes(arguments.sql))#
3332:
3333: <cfset logSQL(arguments.sql)>
The Error Occurred in
C:\xampp\htdocs\system\datamgr_DataMgr.cfc: line 3331
called from C:\xampp\htdocs\system\datamgr\DataMgr_MSSQL.cfc: line 23
called from C:\xampp\htdocs\system\datamgr\DataMgr_MSSQL.cfc: line 34
called from C:\xampp\htdocs\system\datamgr\DataMgr_MSSQL.cfc: line 540
called from C:\xampp\htdocs\system\datamgr_DataMgr.cfc: line 1135
I made some updates to spamFilter regex logic and updated to the latest version of sebTools before forking & comitting. (NOTE: The library files I'm using are all dated 2/4/2021 and the current build is dated 2/17/2022. I'm using MSSQL 2016.)
After upgrading, the spamFilter init's loadXML
function is taking an extra long time (74,084ms) when importing the default 17 XML rules.
variables.DataMgr.loadXML(getDbXml(),true,true);
If I use the build from 2/4/2021, the initialization for spamFilter time is only ~600ms.
Is this a known issue? Have you encountered it before? (I'd like to upgrade, but something seems wrong.)
After reading an article regarding memory leaks w/the native Adobe DataDirect SQL driver, I decided to test the Microsoft JDBCSQL connector. I've found that in addition to less memory problems, it's also a little faster. There's only one issue though; JDBC doesn't know how to handle "variant" data types and throws an error.
This means that unknown variant values will need to be cast (or converted) to VARCHAR in order to work.
I'm using the SpamFilter component and was receiving a 500 error when using the JDBC connector.
Line 23 of DataMgr_MSSQL.cfc, the getDatabaseVersion
function uses the following SQL:
SELECT SERVERPROPERTY('productversion') AS VersionNum
and should be updated to:
SELECT CAST(SERVERPROPERTY('productversion') AS VARCHAR(255)) AS VersionNum
When I added reCaptcha and then migrated to hCaptcha, I saw that SpamFilter was penalizing the submission due to the grecaptcharesponse
, g-recaptcha-response
and h-captcha-response
values in the FORM scope. Some legitimate email addresses that contained digits were also being awarded points and triggering spam detection.
I recommend adding an ignore list as well as a function to identify which rules are being used and the associated points that go with the rule. (I submitted a patch to assist with this.)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.