The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Politics::AU::Geo::Members - Politics::AU::Geo class for the members table

SYNOPSIS

  TO BE COMPLETED

DESCRIPTION

TO BE COMPLETED

METHODS

select

  # Get all objects in list context
  my @list = Politics::AU::Geo::Members->select;
  
  # Get a subset of objects in scalar context
  my $array_ref = Politics::AU::Geo::Members->select(
      'where rid > ? order by rid',
      1000,
  );

The select method executes a typical SQL SELECT query on the members table.

It takes an optional argument of a SQL phrase to be added after the FROM members 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 Politics::AU::Geo::Members objects when called in list context, or a reference to an ARRAY of Politics::AU::Geo::Members objects when called in scalar context.

Throws an exception on error, typically directly from the DBI layer.

count

  # How many objects are in the table
  my $rows = Politics::AU::Geo::Members->count;
  
  # How many objects 
  my $small = Politics::AU::Geo::Members->count(
      'where rid > ?',
      1000,
  );

The count method executes a SELECT COUNT(*) query on the members table.

It takes an optional argument of a SQL phrase to be added after the FROM members 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 the number of objects that match the condition.

Throws an exception on error, typically directly from the DBI layer.

ACCESSORS

rid

  if ( $object->rid ) {
      print "Object has been inserted\n";
  } else {
      print "Object has not been inserted\n";
  }

Returns true, or throws an exception on error.

REMAINING ACCESSORS TO BE COMPLETED

SQL

The members table was originally created with the following SQL command.

  CREATE TABLE members
  (
  rid INTEGER PRIMARY KEY,
  title varchar(50) NOT NULL,
  fname varchar(50) NOT NULL,
  lname varchar(50) NOT NULL,
  postnominals varchar(20),
  party varchar(100),
  URL varchar(500) NOT NULL,
  electorate varchar(100) NOT NULL,
  state varchar(10) NOT NULL,
  level varchar(10) NOT NULL,
  house  varchar(255) NOT NULL
  )

SUPPORT

Politics::AU::Geo::Members is part of the Politics::AU::Geo API.

See the documentation for Politics::AU::Geo for more information.

AUTHOR

Jeffery Candiloro <jeffery@cpan.org>

Adam Kennedy <adamk@cpan.org>

COPYRIGHT

Copyright 2009 Jeffery Candiloro.

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

The full text of the license can be found in the LICENSE file included with this module.