dbiStockManiac Database Interface (DBI)
This class contains generically usable SQL statements which are packaged into methods ready for use.
All of this is available through a StockManiac object. Plugins should make use of this whenever possible to avoid the need for plugin specific SQL statements for almost everything. Less SQL statements in the application is beautiful. :-)
Located in /lib/dbi.class.php (line 50)
session | --gui | --dbc | --dbi
| Class | Description |
|---|---|
stockmaniac
|
StockManiac |
void
sql_assign_document
(int $id_document, [int $id_position = false], [int $id_order = false], [int $id_portfolio = false], [bool $is_assigned = true])
void
sql_select_documents
(int $id_user, [int $id_position = false], [int $id_portfolio = false], [int $id_order = false], [bool $descending = false])
void
sql_select_positions
(int $id_user, int $end_date, [int $start_date = false], [int $id_portfolio = false], [bool $is_open = false], [bool $is_closed = false])
void
sql_select_split
([int $id_stock = false], [ $order = false], [int $id_split = false], bool $asc)
void
sql_select_timetags
(int $id_user, [int $id_timetag = false], [int $start = false], [int $end = false])
Inherited from dbc
dbc::$sql_affected_rows
dbc::$sql_error
dbc::$sql_execution_time
dbc::$_db
dbc::$_result
Inherited from gui
gui::$themes
gui::$_smarty
Inherited from session
session::$err
Constructor __construct (line 56)
sql_assign_document (line 935)
Assing document to a position, order or portfolio. At least one of those must be given.
sql_check_version (line 85)
Select most recent database schema version./
sql_close_position (line 603)
Close a position.
ATTENTION: close is performed without any checks. This might not be what you want, especially if it still contains shares.
sql_delete_broken_document (line 789)
Delete document content as well as its metadata even if contraints do not exist the way they should.
ATTENTION: Only useful during the upload phase. Do not use otherwise.
sql_delete_document (line 758)
Delete document content as well as its metadata.
sql_delete_setting (line 687)
Delete a user setting.
sql_get_user_details (line 104)
Select detailed information from given login name.
sql_select_acls (line 709)
Select user Access Control Lists (ACLs)
sql_select_comments (line 1025)
Select user comment(s) by user id and time, optionally comment id.
sql_select_documents (line 845)
Select document meta data by various criteria. At least a UID must be given.
sql_select_document_content (line 725)
Select document content.
ATTENTION: result is likely to contain binary data.
sql_select_first_position (line 570)
Select first position id and its stock id from a user portfolio.
sql_select_last_insert_id (line 72)
Select last insert id.
Depends on what the previous query did. If it was a INSERT query on a table with AUTO_INCREMENT column it should return the value created by AUTO_INCREMENT.
sql_select_order (line 280)
Select order details by given position and order id.
sql_select_orders (line 333)
Select orders by position and (optionally) list of order ids and presense of a current quote.
NOTE: a present quote value actually means that the order has been executed and is not pending anymore.
sql_select_portfolios (line 258)
Select User Portfolios.
sql_select_positions (line 457)
Select list of positions matching various criteria.
sql_select_position_details (line 425)
Select details for given position.
sql_select_position_uid (line 547)
Select the owner of a position.
sql_select_quotes (line 227)
Select quotes for a specific date and (optionaly) specific stock(s).
sql_select_settings (line 617)
Select settings by user, optionally limited to a specific plugin.
sql_select_split (line 979)
Select split data for a given security or split.
sql_select_stocks (line 208)
Select a list of all Stocks in the System.
Ueful with sql_get_indexedlist_result(). Optionally pass a array of IDs to be exclude from the listing.
sql_select_timetags (line 1064)
Select timetags.
NOTE:
sql_store_document (line 820)
Store document meta data.
sql_store_document_content (line 904)
Store document content data (often binary).
sql_store_position (line 394)
Store position data.
sql_store_setting (line 663)
Store a user setting.
sql_update_password (line 191)
Update user password.
NOTE: we rely on PHPs md5() public function, not on mySQL.
sql_verify_password (line 143)
Verify username/password combination.
NOTE: we rely on PHPs md5() public function, not on mySQL.
Inherited From dbc
dbc::__construct()
dbc::sql()
dbc::sql_escape_string()
dbc::sql_get_array_result()
dbc::sql_get_indexedlist_result()
dbc::sql_get_objectarray_result()
dbc::sql_get_object_result()
dbc::sql_get_result()
dbc::sql_max_packet_size()
dbc::sql_script()
Inherited From gui
gui::__construct()
gui::append()
gui::assign()
gui::debug()
gui::display()
gui::get_microtime()
gui::get_template_vars()
gui::get_themes()
gui::register_object()
gui::set_default_theme()
Inherited From session
session::__construct()
session::sess_destroy()
session::sess_exists()
session::sess_get_var()
session::sess_store_var()
session::sess_unset_var()
Documentation generated on Sun, 22 Aug 2010 11:20:17 +0200 by phpDocumentor 1.4.3