package Padre::DB::Bookmark; use 5.008; use strict; use warnings; our $VERSION = '0.50'; sub select_names { Padre::DB->selectcol_arrayref('select name from bookmark order by name'); } # Finds and returns a single element by name sub fetch_name { return ( $_[0]->select( 'where name = ?', $_[1] ) )[0]; } 1; __END__ =pod =head1 NAME Padre::DB::Bookmark - Padre::DB class for the bookmark table =head1 SYNOPSIS TO BE COMPLETED =head1 DESCRIPTION TO BE COMPLETED =head1 METHODS =head2 select # Get all objects in list context my @list = Padre::DB::Bookmark->select; # Get a subset of objects in scalar context my $array_ref = Padre::DB::Bookmark->select( 'where name > ? order by name', 1000, ); The C query on the bookmark table. It takes an optional argument of a SQL phrase to be added after the C section of the query, followed by variables to be bound to the placeholders in the SQL phrase. Any SQL that is compatible with SQLite can be used in the parameter. Returns a list of B objects when called in list context, or a reference to an ARRAY of B objects when called in scalar context. Throws an exception on error, typically directly from the L layer. =head2 count # How many objects are in the table my $rows = Padre::DB::Bookmark->count; # How many objects my $small = Padre::DB::Bookmark->count( 'where name > ?', 1000, ); The C method executes a C