Skip to content

Commit 9dd47a9

Browse files
committed
Update README.md
Add exported functions.
1 parent b5be2e3 commit 9dd47a9

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

README.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,23 @@ A Julia interface to the SQLite library and support for operations on DataFrames
7474

7575
`drop` is pretty self-explanatory. It's really just a convenience wrapper around `query` to execute a DROP TABLE command, while also calling "VACUUM" to clean out freed memory from the database.
7676

77+
* `registerfunc(db::SQLiteDB, nargs::Int, func::Function, isdeterm::Bool=true; name="")`
78+
79+
Register a function `func` (which takes `nargs` number of arguments) with the SQLite database connection `db`. If the keyword argument `name` is given the function is registered with that name, otherwise it is registered with the name of `func`. If the function is stochastic (e.g. uses a random number) `isdeterm` should be set to `false`, see SQLite's [function creation documentation](http://sqlite.org/c3ref/create_function.html) for more information.
80+
81+
* `@scalarfunc function`
82+
`@scalarfunc name function`
83+
84+
Define a function which can then be passed to `registerfunc`. In the first usage the function name is infered from the function definition, in the second it is explicitly given as the first parameter. The second form is only recommended when it's use is absolutely necessary, see below.
85+
86+
* `sr"..."`
87+
88+
This string literal is used to escape all special characters in the string, useful for using regex in a query.
89+
90+
* `sqlreturn(contex, val)`
91+
92+
This function should never be called explicitly. Instead it is exported so that it can be overloaded when necessary, see below.
93+
7794
#### User Defined Functions
7895

7996
##### SQLite Regular Expressions

0 commit comments

Comments
 (0)