- Notifications
You must be signed in to change notification settings - Fork689
Alasql Options
Mathias Wulff edited this pageNov 13, 2023 ·9 revisions
You can find all AlaSQL options in thealasql.options variable. The options are global for all databases - also if you create them withnew.
You can change these options directly from #" alasql.options.autocommit = true;">
alasql.options.autocommit=true;
or from SQL with theSET statement:
SET AUTOCOMMIT OFF;SET MODIFIER="RECORDSET";
Setting them via theSET statement is the only option when running from the console or if you run as a webworker and want to change options during executions.
/** Log or throw error */errorlog:false,/** Use valueof in orderfn */valueof:true,/** Callback for async queries progress */progress:false,/** Date separator for Now() function */nowdateseparator:'-',// Date-time Separator for Now() functionnowdatetimeseparator:' ',/** DROP database in any case */dropifnotexists:false,/** How to handle DATE and DATETIME types */datetimeformat:'sql',/** Table and column names are case sensitive and converted to lower-case */casesensitive:true,/** target for log. Values: 'console', 'output', 'id' of html tag */logtarget:'output',/** Print SQL at log */logprompt:true,/** Callback for async queries progress */progress:false,/** * Default modifier * values: RECORDSET, VALUE, ROW, COLUMN, MATRIX, TEXTSTRING, INDEX *@type {'RECORDSET'|'VALUE'|'ROW'|'COLUMN'|'MATRIX'|'TEXTSTRING'|'INDEX'|undefined} */modifier:undefined,/** How many rows to lookup to define columns */columnlookup:10,/** Create vertex if not found */autovertex:true,/** Use dbo as current database (for partial T-SQL comaptibility) */usedbo:true,/** AUTOCOMMIT ON | OFF */autocommit:true,/** Use cache */cache:true,/** Check for NaN and convert it to undefined */nan:false,/** excel config*/excel:{cellDates:true},/** Option for SELECT * FROM a,b */joinstar:'overwrite',/* When false, both NOW and GETDATE will return a Date object instead of a string formatted Date */dateAsString:true
© 2014-2026,Andrey Gershun &Mathias Rangel Wulff
Please help improve the documentation by opening a PR on thewiki repo