App::Chart::Database -- database functions
$symbolto the database. If
$symbolis already in the database then remove its "historical" marker.
App::Chart::Database->delete_symbol ($symbol, $notes_too)
Delete all data relating to
$symbolfrom the database. If
$notes_toois given and it's true then delete user notes and annotations too.
Return true if
$symbolexists in the database.
- App::Chart::Database->symbol_is_historical ($symbol)
Return true if
$symbolis marked as historical, meaning it's delisted, or renamed, or whatever, but in any case is no longer actively trading.
Return the stock or commodity name for
$symbol, obtained from the database.
Return the number of decimal places normally shown on prices for
$symbol. For example prices in dollars might have this as 2 to show dollars and cents.
It's possible particular prices in the database or a quote might have more than this many places. The return is 0 if there's no information on
$value = App::Chart::Database->read_extra ($symbol, $key)
App::Chart::Database->write_extra ($symbol, $key, $value)
Read or write extra data associated with
$keyis a string describing the data,
$valueis a string or
undefmeans delete the data.
$symbolcan be the empty string "" for global extra data. Some data sources cache information this way.
Copyright 2008, 2009, 2010, 2011 Kevin Ryde
Chart is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, or (at your option) any later version.
Chart is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with Chart; see the file COPYING. Failing that, see http://www.gnu.org/licenses/.