Class: atki5db
Source Location: /db/class.atki5db.inc
Class atki5db
Class Overview
|
IBM i5-specific databasedriver. This driver is based on the db2 driver but uses the i5_ library instead of the db2_ library. This allows us not just execute queries, but also to run some commands on the i5 machine. This is used to set the librarylist on-the-fly, for example.
You can supply a librarylist in your database configuration by adding librarylist to your database configuration: $db['default']['librarylist'] = array('MYLIBL', 'HISLIBL');
Located in /db/class.atki5db.inc [line 17]
Wiki documentation
atkDb
|
--atkdb2db
|
--atki5db
Author(s):
Information Tags:
|
Methods
|
Method Summary
| affected |
affected_rows() |
Evaluate the result; which rows were affected by the query. |
| array |
metadata() |
Return the meta data of a certain table |
| result |
next_record() |
Goto the next record in the result set |
| number |
num_fields() |
Evaluatie the result; how many fields where affected by the query. |
| number |
num_rows() |
Evaluate the result; how many rows were affected by the query. |
| boolean |
query() |
Performs a query |
| result |
unlock() |
Unlock table(s) in the database |
| void |
_setErrorVariables() |
Get errornumber and errormessage from the i5 machine and store them |
Methods
void add_to_librarylist(
$libraries
)
|
|
Parameters:
affected affected_rows(
)
|
|
Evaluate the result; which rows were affected by the query.
API Tags:
Redefinition of:
- atkdb2db::affected_rows()
- Evaluate the result; which rows were affected by the query.
mixed doConnect(
string
$host, string
$user, string
$password,
$database,
$port,
$charset
)
|
|
Connect to the i5 machine
Parameters:
|
string |
$host: |
Hostname |
|
string |
$user: |
Username |
|
string |
$password: |
Password |
|
|
$database: |
|
|
|
$port: |
|
|
|
$charset: |
|
API Tags:
| Return: | Connection status |
Redefinition of:
- atkdb2db::doConnect()
- Connect to the database
array metadata(
String
$table, [boolean
$full = false]
)
|
|
Return the meta data of a certain table
Parameters:
|
String |
$table: |
the table name (optionally in 'database.tablename' format) |
|
boolean |
$full: |
all meta data or not |
API Tags:
Redefinition of:
- atkdb2db::metadata()
- Return the meta data of a certain table
Parameters:
Redefinition of:
- atkdb2db::nextid()
- Get the next sequence number of a certain sequence.
result next_record(
[
$row_number = null]
)
|
|
Goto the next record in the result set
Parameters:
API Tags:
| Return: | of going to the next record |
Redefinition of:
- atkdb2db::next_record()
- Goto the next record in the result set
Evaluatie the result; how many fields where affected by the query.
API Tags:
| Return: | of affected fields |
Redefinition of:
- atkdb2db::num_fields()
- Evaluatie the result; how many fields where affected by the query.
Evaluate the result; how many rows were affected by the query.
API Tags:
Redefinition of:
- atkdb2db::num_rows()
- Evaluate the result; how many rows were affected by the query.
boolean query(
$query
$query, [$offset
$offset = -1], [$limit
$limit = -1]
)
|
|
Performs a query
Parameters:
|
$query |
$query: |
the query |
|
$offset |
$offset: |
offset in record list |
|
$limit |
$limit: |
maximum number of records |
API Tags:
| Return: | True on success, false on failure |
Redefinition of:
- atkdb2db::query()
- Performs a query
void seek(
[
$row_number = 0]
)
|
|
Parameters:
Redefinition of:
- atkdb2db::seek()
- Goto a certain position in result set.
Unlock table(s) in the database
API Tags:
Redefinition of:
- atkdb2db::unlock()
- Unlock table(s) in the database
void _setErrorVariables(
)
|
|
Get errornumber and errormessage from the i5 machine and store them
in the errno and error member variables
Redefinition of:
- atkdb2db::_setErrorVariables()
- Store MySQL errors in internal variables