1
0
Fork 0
mirror of https://github.com/DBD-SQLite/DBD-SQLite synced 2025-06-09 07:08:07 -04:00

Doc tweak

This commit is contained in:
Adam Kennedy 2009-04-05 19:33:59 +00:00
parent 9dbd444ccb
commit 5172c82430

View file

@ -517,6 +517,31 @@ After this, it could be use from SQL as:
INSERT INTO mytable ( now() ); 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' ) =head2 $dbh->func( $name, $argc, $pkg, 'create_aggregate' )
This method will register a new aggregate function which can then be used 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 =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() =item new()
This method will be called once to create an object which should This method will be called once to create an object which should