=pod

=encoding utf8

=head1 SQLite

    # create database
    my $dbh = P->handle('sqlite:/path/to/db.sqlite');

    # create memory databse
    my $dbh = P->handle('sqlite:');

=head2 field with the current unix timestamp by default

    "unix_timestamp" INTEGER NOT NULL DEFAULT(STRFTIME('%s', 'NOW'))
    "unix_timestamp_hires" FLOAT NOT NULL DEFAULT(time_hires())

=head2 field with the current timestamp by default

    "timestamp" TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP
    "timestamp_with_milliseconds" TIMESTAMP NOT NULL DEFAULT(STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW'))

=head2 autogenerated UUID

    CAST(uuid_generate_v1mc() AS BLOB)
    CAST(uuid_generate_v4() AS BLOB)

=head2 FAQ

SQLite will NOT use the second column of an index if the first column was an inequality expression (eg. customer > 33).

If you create two separate indices, only one of them will be used, the other expression will be evaluated on the result set generated by the first. (on an Oracle, it could execute the two index search and intersect the result sets, if optimization is cost based and certain criteria meets, but thats a rare case).

=cut
