mirror of
https://github.com/DBD-SQLite/DBD-SQLite
synced 2025-06-08 22:58:17 -04:00
Doc tweak
This commit is contained in:
parent
9dbd444ccb
commit
5172c82430
1 changed files with 25 additions and 25 deletions
|
@ -517,6 +517,31 @@ After this, it could be use from SQL as:
|
|||
|
||||
INSERT INTO mytable ( now() );
|
||||
|
||||
=head2 $dbh->func( $name, $code_ref, "create_collation" )
|
||||
|
||||
This method will register a new function which will be useable in an SQL
|
||||
query as a COLLATE option for sorting. The method's parameters are:
|
||||
|
||||
=over
|
||||
|
||||
=item $name
|
||||
|
||||
The name of the function. This is the name of the function as it will
|
||||
be used from SQL.
|
||||
|
||||
=item $code_ref
|
||||
|
||||
This should be a reference to the function's implementation.
|
||||
|
||||
=back
|
||||
|
||||
By default, the collations "perl" and "perllocale" are created for you.
|
||||
|
||||
These allow sorting in Perl terms using "cmp", in both locale and non-locale
|
||||
forms. For example, the following does a locale-aware Perl cmp sort.
|
||||
|
||||
SELECT * FROM foo ORDER BY name COLLATE perllocale
|
||||
|
||||
=head2 $dbh->func( $name, $argc, $pkg, 'create_aggregate' )
|
||||
|
||||
This method will register a new aggregate function which can then be used
|
||||
|
@ -545,31 +570,6 @@ The aggregator interface consists of defining three methods:
|
|||
|
||||
=over
|
||||
|
||||
=head2 $dbh->func( $name, $code_ref, "create_collation" )
|
||||
|
||||
This method will register a new function which will be useable in an SQL
|
||||
query as a COLLATE option for sorting. The method's parameters are:
|
||||
|
||||
=over
|
||||
|
||||
=item $name
|
||||
|
||||
The name of the function. This is the name of the function as it will
|
||||
be used from SQL.
|
||||
|
||||
=item $code_ref
|
||||
|
||||
This should be a reference to the function's implementation.
|
||||
|
||||
=back
|
||||
|
||||
By default, the collations "perl" and "perllocale" are created for you.
|
||||
|
||||
These allow sorting in Perl terms using "cmp", in both locale and non-locale
|
||||
forms. For example, the following does a locale-aware Perl cmp sort.
|
||||
|
||||
SELECT * FROM foo ORDER BY name COLLATE perllocale
|
||||
|
||||
=item new()
|
||||
|
||||
This method will be called once to create an object which should
|
||||
|
|
Loading…
Add table
Reference in a new issue