=head1 NAME

ORDB::CPANTS::Dist - ORDB::CPANTS class for the dist table

=head1 SYNOPSIS

  TO BE COMPLETED

=head1 DESCRIPTION

TO BE COMPLETED

=head1 METHODS

=head2 select

  # Get all objects in list context
  my @list = ORDB::CPANTS::Dist->select;
  
  # Get a subset of objects in scalar context
  my $array_ref = ORDB::CPANTS::Dist->select(
      'where id > ? order by id',
      1000,
  );

The C<select> method executes a typical SQL C<SELECT> query on the
dist table.

It takes an optional argument of a SQL phrase to be added after the
C<FROM dist> 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<ORDB::CPANTS::Dist> objects when called in list context, or a
reference to an ARRAY of B<ORDB::CPANTS::Dist> objects when called in scalar context.

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

=head2 count

  # How many objects are in the table
  my $rows = ORDB::CPANTS::Dist->count;
  
  # How many objects 
  my $small = ORDB::CPANTS::Dist->count(
      'where id > ?',
      1000,
  );

The C<count> method executes a C<SELECT COUNT(*)> query on the
dist table.

It takes an optional argument of a SQL phrase to be added after the
C<FROM dist> 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 L<DBI> layer.

=head1 ACCESSORS

=head2 id

  if ( $object->id ) {
      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

=head1 SQL

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

  CREATE TABLE dist (
    id integer not null,
    run integer,
    dist text,
    package text,
    vname text,
    author integer,
    version text,
    version_major text,
    version_minor text,
    extension text,
    extractable integer not null,
    extracts_nicely integer not null,
    size_packed integer not null,
    size_unpacked integer not null,
    released timestamp without time zone,
    files integer not null,
    files_list text,
    dirs integer not null,
    dirs_list text,
    symlinks integer not null,
    symlinks_list text,
    bad_permissions integer not null,
    bad_permissions_list text,
    file_makefile_pl integer not null,
    file_build_pl integer not null,
    file_readme text,
    file_manifest integer not null,
    file_meta_yml integer not null,
    file_signature integer not null,
    file_ninja integer not null,
    file_test_pl integer not null,
    file_changelog text,
    dir_lib integer not null,
    dir_t integer not null,
    dir_xt integer not null,
    broken_module_install text not null,
    manifest_matches_dist integer not null,
    buildfile_executable integer not null,
    license text,
    metayml_is_parsable integer not null,
    file_license integer not null,
    needs_compiler integer not null,
    got_prereq_from text,
    is_core integer not null,
    file__build integer not null,
    file_build integer not null,
    file_makefile integer not null,
    file_blib integer not null,
    file_pm_to_blib integer not null,
    stdin_in_makefile_pl integer not null,
    stdin_in_build_pl integer not null,
    external_license_file text,
    file_licence text,
    licence_file text,
    license_file text,
    license_type text,
    no_index text,
    ignored_files_list text,
    license_in_pod integer not null,
    license_from_yaml text,
    license_from_external_license_file text,
    test_files_list text,
    primary key (id)
  )

=head1 SUPPORT

ORDB::CPANTS::Dist is part of the L<ORDB::CPANTS> API.

See the documentation for L<ORDB::CPANTS> for more information.

=head1 AUTHOR

Adam Kennedy

=head1 COPYRIGHT

Copyright 2009 Adam Kennedy.

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.

