Kexi/Plugins/Queries/SQL Functions: Difference between revisions

From KDE Community Wiki
< Kexi‎ | Plugins‎ | Queries
No edit summary
No edit summary
Line 1: Line 1:
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.
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 focusing on an SQL standard.


==Functions==
==Functions==

Revision as of 10:24, 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 focusing on an SQL standard.

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


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


Name Description sqlite pgsql mysql mssql xbase

SQLite-specific 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.

Links