Nuno Filipe Monteiro Nunes > perl-GPSData > Geo::GPS::Data::Storage::MySQL

Download:
perl-GPSData-0.04.tar.gz

Dependencies

Annotate this POD

CPAN RT

Open  0
Report a bug
Module Version: 0.04   Source  

NAME ^

Geo::GPS::Data::Storage::MySQL - MySQL storage module for the perl-GPSData package.

SYNOPSIS ^

  use Geo::GPS::Data::Storage::MySQL;

  my %href = (
    database => 'gpsdata',
    host => 'localhost',
    username => 'gpsuser',
    password => 'mypasswd'
  );
  my $d = Geo::GPS::Data->new([\%href]);
  $m = Geo::GPS::Data::Storage::MySQL->new();

  $waypt_types = $m->waypoint_types();

  $id = $m->store_waypoint({
        name=>$name,
        latitude=>$lat,
        longitude=>$lon,
        comment=>$comm,
        type_id=>$type_id,
        date_collected=>$d_col,
        ellipsoid=>$ell_id
        });

  $res = retrieve_waypoint(id=>$id);
  $res = delete_waypoint(id=>$id);
  $exists = exists_waypoint(id=>$id);

  $id = $s->store_collection(
        name=>$name,
        comment=>$comm,
        type_id=>$type_id,
        date_collected=>$d_col,
        waypoints=>\@waypoint_id_list
  );
  $res = retrieve_collection(id=>$id);
  $res = delete_collection(id=>$id);
  $exists = exists_collection(id=>$id);

DESCRIPTION ^

This is an internal module of the perl-GPSData package and should not be used directly by a program. This module implements the storage methods on a mysql database.

storage_params
database

The name of te database to use. Deafults to "gpsdata";

host

The hostname where the database is installed. Defaults to "localhost";

username

The database username with read/write permissions. Defaults to "gpstst";

password

The password for this user. Defaults to "zbr.zbr".

AUTHOR ^

Nuno Nunes, <nfmnunes@cpan.org>

SEE ALSO ^

Geo::GPS::Data, Geo::GPS::Data::Waypoint.