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

NAME

Finance::GeniusTrader::DB::CSV - Access to a text files by DBI::CSV

DESCRIPTION

This module handels the access to textfiles by using the DBI:File-module.

Configuration

You can put some configuration items in ~/.gt/options to indicate where the database is.

DB::csv::database : the type of the database ("CSV" by default)
DB::csv::dbname : the name of the database ("cours" by default)
DB::csv::dbhost : the host of the database ("" = localhost by default)
DB::csv::dbuser : the user account on the database
DB::csv::dbpasswd : the password of the user account

Functions

Finance::GeniusTrader::DB::csv->new()

Creates a new database-object

$db->disconnect

Disconnects from the database.

$db->init_table($code)

Creates the table of stock $code.

$db->init_add_info()

Creates the addinfo-table.

$db->init_add_info()

Creates the shares-table.

$db->get_prices($code)

Returns a Finance::GeniusTrader::Prices object containing all known prices for the symbol $code.

$db->get_last_prices($code, $limit)

Returns a Finance::GeniusTrader::Prices object containing the $limit last known prices for the symbol $code.

$db->insert($code)

Creates the table of stock $code.

$db->get( parameters )

Get the datasets where all the parameters match

$db->available( $code, $date )

Returns 1 if a dataset for the corresponding day is available.

$db->get( parameters )

Delete the datasets where all the parameters match

$db->edit( parameters )

Edit the dataset where the date and the code matches

$db->table_exists($code)

Test if a table for stock $code already exists

$db->get_db_name($code)

Returns the name of the stock designated by $code.

$db->get_db_code($name)

Returns the code of the stock designated by $name.

$db->get_add_info($code,$date)

Returns an additional information about the stock

$db->get_add_info($code,$date)

Returns an additional information about the stock

$db->set_add_info($value, $info, $code, $date)

Set an additional information about the stock

$db->update_from_source($code)

This function is getting the actual information from the web.

$db->get_all_prices($code)

Dummy function. Need to define a clear interface for the exchange.

$db->merge_from_source($source, $code)

Merges the content of an other database/source into the current db. This needs to be updated with a "ranking" algorithm.

$db->merge_all_from_source($source)

Merges the content of all shares in an other database/source into the current db.

$db->update_all_from_source($source)

Updates all shares from a source.