Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
SPOPS::DBI::SQLite(3) User Contributed Perl DocumentationSPOPS::DBI::SQLite(3)

NAME
       SPOPS::DBI::SQLite -- SQLite-specific code for DBI collections

SYNOPSIS
	myobject => {
	  isa		  => [ qw( SPOPS::DBI::SQLite SPOPS::DBI ) ],
	  increment_field => 1,
	  id_field	  => 'id',
	  no_insert	  => [ 'id' ],
	};

DESCRIPTION
       This just implements some SQLite-specific routines so we	can abstract
       them out.

       One of these items is to	auto-generate keys. SQLite supports auto-
       generated keys in one instance only -- when you specify the first
       column as an "integer" field (not "int",	for some reason	SQLite is
       sensitive to this) and as the primary key. For the value	to be
       generated, you should not insert	a value	for it.

       So to use auto-generated	keys, just define your table:

	CREATE TABLE my_table (
	  id integer not null primary key,
	  ...
	)

       or

	CREATE TABLE my_table (
	  id integer not null,
	  ...
	  primary key (	id )
	)

       And tell	SPOPS you are using an auto-increment field:

	myobject => {
	  isa		  => [ qw( SPOPS::DBI::SQLite SPOPS::DBI ) ],
	  increment_field => 1,
	  id_field	  => 'id',
	  no_insert	  => [ 'id' ],
	};

       NOTE: Since SQLite is typeless, we assume for quoting purposes that
       everything is a "SQL_VARCHAR" type of field, overriding
       "db_discover_types" from	SPOPS::SQLInterface with our own version.

BUGS
       None known.

TO DO
       Nothing known.

SEE ALSO
       DBD::SQLite

       DBI

COPYRIGHT
       Copyright (c) 2002-2004 intes.net, inc..	All rights reserved.

       This library is free software; you can redistribute it and/or modify it
       under the same terms as Perl itself.

AUTHORS
       Chris Winters <chris@cwinters.com>

perl v5.32.0			  2004-06-02		 SPOPS::DBI::SQLite(3)

NAME | SYNOPSIS | DESCRIPTION | BUGS | TO DO | SEE ALSO | COPYRIGHT | AUTHORS

Want to link to this manual page? Use this URL:
<https://www.freebsd.org/cgi/man.cgi?query=SPOPS::DBI::SQLite&sektion=3&manpath=FreeBSD+12.2-RELEASE+and+Ports>

home | help