mirror of
https://github.com/DBD-SQLite/DBD-SQLite
synced 2025-06-07 14:19:10 -04:00
documented optional flags for create_function/aggregate
This commit is contained in:
parent
ae1eedab5c
commit
271886156b
1 changed files with 10 additions and 2 deletions
|
@ -1738,7 +1738,7 @@ Retrieve the current busy timeout.
|
|||
|
||||
Set the current busy timeout. The timeout is in milliseconds.
|
||||
|
||||
=head2 $dbh->sqlite_create_function( $name, $argc, $code_ref )
|
||||
=head2 $dbh->sqlite_create_function( $name, $argc, $code_ref, $flags )
|
||||
|
||||
This method will register a new function which will be usable in an SQL
|
||||
query. The method's parameters are:
|
||||
|
@ -1759,6 +1759,10 @@ the function can take any number of arguments.
|
|||
|
||||
This should be a reference to the function's implementation.
|
||||
|
||||
=item $flags
|
||||
|
||||
You can optionally pass an extra flag bit to create_function, which then would be ORed with SQLITE_UTF8 (default). As of 1.47_02 (SQLite 3.8.9), only meaning bit is SQLITE_DETERMINISTIC (introduced at SQLite 3.8.3), which can make the function perform better. See C API documentation at L<http://sqlite.org/c3ref/create_function.html> for details.
|
||||
|
||||
=back
|
||||
|
||||
For example, here is how to define a now() function which returns the
|
||||
|
@ -1827,7 +1831,7 @@ so for most common cases it will be simpler to just
|
|||
add your collation sequences in the C<%DBD::SQLite::COLLATION>
|
||||
hash (see section L</"COLLATION FUNCTIONS"> below).
|
||||
|
||||
=head2 $dbh->sqlite_create_aggregate( $name, $argc, $pkg )
|
||||
=head2 $dbh->sqlite_create_aggregate( $name, $argc, $pkg, $flags )
|
||||
|
||||
This method will register a new aggregate function which can then be used
|
||||
from SQL. The method's parameters are:
|
||||
|
@ -1849,6 +1853,10 @@ of arguments.
|
|||
|
||||
This is the package which implements the aggregator interface.
|
||||
|
||||
=item $flags
|
||||
|
||||
You can optionally pass an extra flag bit to create_aggregate, which then would be ORed with SQLITE_UTF8 (default). As of 1.47_02 (SQLite 3.8.9), only meaning bit is SQLITE_DETERMINISTIC (introduced at SQLite 3.8.3), which can make the function perform better. See C API documentation at L<http://sqlite.org/c3ref/create_function.html> for details.
|
||||
|
||||
=back
|
||||
|
||||
The aggregator interface consists of defining three methods:
|
||||
|
|
Loading…
Add table
Reference in a new issue