Kexi/Plugins/Queries/SQL Functions: Difference between revisions
Appearance
No edit summary |
|||
Line 2: | Line 2: | ||
==Functions== | ==Functions== | ||
*SQLite docs: [https://www.sqlite.org/lang_corefunc.html Core Functions] | |||
{{KexiSQLFuncTableStart}} | {{KexiSQLFuncTableStart}} | ||
{{KexiSQLFuncRow|name=abs(X) | {{KexiSQLFuncRow|name=abs(X) | ||
Line 325: | Line 327: | ||
|} | |} | ||
==Date And Time Functions== | |||
*SQLite docs: [https://www.sqlite.org/lang_datefunc.html Date And Time Functions] | |||
{{KexiSQLFuncTableStart}} | |||
{{KexiSQLFuncRow|name=date(timestring, modifier, modifier, ...) | |||
|desc= | |||
|sqlite= | |||
|pg= | |||
|my= | |||
|ms= | |||
|xb= | |||
}} | |||
{{KexiSQLFuncRow|name=time(timestring, modifier, modifier, ...) | |||
|desc= | |||
|sqlite= | |||
|pg= | |||
|my= | |||
|ms= | |||
|xb= | |||
}} | |||
{{KexiSQLFuncRow|name=datetime(timestring, modifier, modifier, ...) | |||
|desc= | |||
|sqlite= | |||
|pg= | |||
|my= | |||
|ms= | |||
|xb= | |||
}} | |||
{{KexiSQLFuncRow|name=julianday(timestring, modifier, modifier, ...) | |||
|desc= | |||
|sqlite= | |||
|pg= | |||
|my= | |||
|ms= | |||
|xb= | |||
}} | |||
{{KexiSQLFuncRow|name=strftime(format, timestring, modifier, modifier, ...) | |||
|desc= | |||
|sqlite= | |||
|pg= | |||
|my= | |||
|ms= | |||
|xb= | |||
}} | |||
|} | |||
==Aggregate functions== | |||
*SQLite docs: [https://www.sqlite.org/lang_aggfunc.html Aggregate Functions] | |||
{{KexiSQLFuncTableStart}} | |||
|} | |||
==SQLite-specific Functions== | ==SQLite-specific Functions== | ||
*SQLite docs: [https://www.sqlite.org/lang_corefunc.html Core Functions] | |||
{{KexiSQLFuncTableStart}} | {{KexiSQLFuncTableStart}} | ||
Line 378: | Line 432: | ||
}} | }} | ||
|} | |} | ||
==Further work== | ==Further work== | ||
Line 387: | Line 437: | ||
==Links== | ==Links== | ||
Revision as of 10:23, 11 December 2014
This page lists SQL functions that Kexi supports or wants to support. Aggregate functions are included. Support in particular SQL backends is compared (SQLite, PostgreSQL, MySQL). For practical reasons emphasis is put on concrete implementation instead of an SQL standard.
Functions
- SQLite docs: Core Functions
Name | Description | sqlite | pgsql | mysql | mssql | xbase |
---|---|---|---|---|---|---|
abs(X) | ||||||
changes() | ||||||
char(X1,X2,...,XN) | ||||||
coalesce(X,Y,...) | ||||||
glob(X,Y) | ||||||
ifnull(X,Y) | ||||||
instr(X,Y) | ||||||
hex(X) | ||||||
last_insert_rowid() | ||||||
length(X) | ||||||
like(X,Y) | ||||||
like(X,Y,Z) | ||||||
likelihood(X,Y) | ||||||
likely(X) | ||||||
lower(X) | ||||||
ltrim(X) | ||||||
ltrim(X,Y) | ||||||
max(X,Y,...) | ||||||
min(X,Y,...) | ||||||
nullif(X,Y) | ||||||
printf(FORMAT,...) | ||||||
quote(X) | ||||||
random() | ||||||
randomblob(N) | ||||||
replace(X,Y,Z) | ||||||
round(X) | ||||||
round(X,Y) | ||||||
rtrim(X) | ||||||
rtrim(X,Y) | ||||||
soundex(X) | ||||||
substr(X,Y,Z) | ||||||
substr(X,Y) | ||||||
total_changes() | ||||||
trim(X) | ||||||
trim(X,Y) | ||||||
typeof(X) | ||||||
unlikely(X) | ||||||
unicode(X) | ||||||
upper(X) | ||||||
zeroblob(N) |
Date And Time Functions
- SQLite docs: Date And Time Functions
Name | Description | sqlite | pgsql | mysql | mssql | xbase |
---|---|---|---|---|---|---|
date(timestring, modifier, modifier, ...) | ||||||
time(timestring, modifier, modifier, ...) | ||||||
datetime(timestring, modifier, modifier, ...) | ||||||
julianday(timestring, modifier, modifier, ...) | ||||||
strftime(format, timestring, modifier, modifier, ...) |
Aggregate functions
- SQLite docs: Aggregate Functions
Name | Description | sqlite | pgsql | mysql | mssql | xbase |
---|
SQLite-specific Functions
- SQLite docs: Core Functions
Name | Description | sqlite | pgsql | mysql | mssql | xbase |
---|---|---|---|---|---|---|
load_extension(X) load_ extension(X,Y) |
Loads SQLite extensions out of the shared library file named X using the entry point Y. The result of load_extension() is always a NULL. If Y is omitted then the default entry point name is used. The load_extension() function raises an exception if the extension fails to load or initialize correctly. The load_extension() function will fail if the extension attempts to modify or delete an SQL function or collating sequence. The extension can add new functions or collating sequences, but cannot modify or delete existing functions or collating sequences because those functions and/or collating sequences might be used elsewhere in the currently running SQL statement. To load an extension that changes or deletes functions or collating sequences, use the sqlite3_load_extension() C-language API. For security reasons, extension loaded is turned off by default and must be enabled by a prior call to sqlite3_enable_load_extension(). |
|||||
sqlite_ compileoption_ get(N) | A wrapper around the sqlite3_compileoption_get() C/C++ function. This routine returns the N-th compile-time option used to build SQLite or NULL if N is out of range. See also the compile_options pragma. | |||||
sqlite_ compileoption_ used(X) | A wrapper around the sqlite3_compileoption_used() C/C++ function. When the argument X to sqlite_compileoption_used(X) is a string which is the name of a compile-time option, this routine returns true (1) or false (0) depending on whether or not that option was used during the build. | |||||
sqlite_ source_id() | Returns a string that identifies the specific version of the source code that was used to build the SQLite library. The string returned by sqlite_source_id() begins with the date and time that the source code was checked in and is follows by an SHA1 hash that uniquely identifies the source tree. This function is an SQL wrapper around the sqlite3_sourceid() C interface. | |||||
sqlite_version() | Returns the version string for the SQLite library that is running. This function is an SQL wrapper around the sqlite3_libversion() C-interface. |
Further work
Add comparison for other backends: Sybase/MSSQL, xBase.