diff options
| author | Greg Larkin <glarkin@FreeBSD.org> | 2010-03-05 19:29:17 +0000 |
|---|---|---|
| committer | Greg Larkin <glarkin@FreeBSD.org> | 2010-03-05 19:29:17 +0000 |
| commit | 6f9d598dba5c458063de4bfc9efbf7206bc021db (patch) | |
| tree | 4d66d46a762705ac5fe8e53ea262711aa6f79717 /databases/sqlite-ext-miscfuncs/files | |
| parent | Fix build with custom PREFIX. (diff) | |
Provide mathematical, string and aggregate functions for SQL queries
using the SQLite loadable extensions mechanism.
Math functions:
acos, asin, atan, atn2, atan2, acosh, asinh, atanh, difference,
degrees, radians, cos, sin, tan, cot, cosh, sinh, tanh, coth,
exp, log, log10, power, sign, sqrt, square, ceil, floor, pi
String functions:
replicate, charindex, leftstr, rightstr, ltrim, rtrim, trim,
replace, reverse, proper, padl, padr, padc, strfilter
Aggregate functions:
stdev, variance, mode, median, lower_quartile, upper_quartile
WWW: http://www.sqlite.org/contrib
Submitted by: myself (glarkin)
Feature safe: yes
Diffstat (limited to 'databases/sqlite-ext-miscfuncs/files')
| -rw-r--r-- | databases/sqlite-ext-miscfuncs/files/README.in | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/databases/sqlite-ext-miscfuncs/files/README.in b/databases/sqlite-ext-miscfuncs/files/README.in new file mode 100644 index 000000000000..5365a6d87ad0 --- /dev/null +++ b/databases/sqlite-ext-miscfuncs/files/README.in @@ -0,0 +1,29 @@ +Usage instructions for applications calling the sqlite3 API functions: + + In your application, call sqlite3_enable_load_extension(db,1) to + allow loading external libraries. Then load the library + %%LIBFILE%% using sqlite3_load_extension; the third argument + should be 0. See http://www.sqlite.org/cvstrac/wiki?p=LoadableExtensions. + Select statements may now use these functions, as in: + + SELECT cos(radians(inclination)) FROM satsum WHERE satnum = 25544; + + +Usage instructions for the sqlite3 program: + + If the program is built so that loading extensions is permitted, + the following will work: + + sqlite> SELECT load_extension('%%LIBFILE%%'); + sqlite> select cos(radians(45)); + 0.707106781186548 + + Note: Loading extensions is by default prohibited as a + security measure; see "Security Considerations" in + http://www.sqlite.org/cvstrac/wiki?p=LoadableExtensions. + + If the sqlite3 program and library are built this + way, you cannot use these functions from the program, you + must write your own program using the sqlite3 API, and call + sqlite3_enable_load_extension as described above, or else + rebuilt the sqlite3 program to allow loadable extensions. |
