WIP sofar
This commit is contained in:
@@ -83,8 +83,9 @@ class Database_TSM extends Database {
|
||||
else
|
||||
{
|
||||
// Create a connection and force it to be a new link
|
||||
$this->_connection = sprintf('%s -id=%s -password=%s -displ=list -dataonly=YES %s %s',
|
||||
$this->_connection = sprintf('%s %s -id=%s -password=%s -displ=list -dataonly=YES %s %s',
|
||||
Kohana::config('config.client'),
|
||||
Kohana::config('config.stanza') ? '-server='.Kohana::config('config.stanza') : '',
|
||||
$username,
|
||||
$password,
|
||||
Kohana::config('config.client_errorlogname') ? sprintf('-errorlogname=%s',Kohana::config('config.client_errorlogname')) : '',
|
||||
|
@@ -59,9 +59,6 @@ class Database_TSM_Result extends Database_Result {
|
||||
if ($this->_current_row !== $this->_internal_row AND ! $this->seek($this->_current_row))
|
||||
return FALSE;
|
||||
|
||||
// Increment internal row for optimization assuming rows are fetched in order
|
||||
$this->_internal_row++;
|
||||
|
||||
if ($this->_as_object === TRUE)
|
||||
{
|
||||
// Return an stdClass
|
||||
@@ -72,14 +69,24 @@ class Database_TSM_Result extends Database_Result {
|
||||
// Return an object of given class name
|
||||
$o = new $this->_as_object;
|
||||
|
||||
return $o->_load_values($this->_rows[$this->_current_row++]);
|
||||
return $o->_load_values($this->_rows[$this->_current_row]);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Return an array of the row
|
||||
return $this->_rows[$this->_current_row++];
|
||||
return $this->_rows[$this->_current_row];
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a row value from the query
|
||||
*
|
||||
* TSM returns all columns in upper case
|
||||
*/
|
||||
public function get($name, $default = NULL) {
|
||||
$name = strtoupper($name);
|
||||
|
||||
return parent::get($name,$default);
|
||||
}
|
||||
} // End Database_TSM_Result
|
||||
?>
|
||||
|
Reference in New Issue
Block a user