Squiz Matrix  4.12.2
 All Data Structures Namespaces Functions Variables Pages
InteractiveSqlTerminal Class Reference

Public Member Functions

 __construct ($backend)
 
 __destruct ()
 
 cancel ()
 
 connect ($dsn)
 
 run ()
 
 restoreTerminal ()
 
 autoComplete ($hint)
 
 resetTerminal ($save_existing=true)
 
 setOption ($option, $value)
 

Detailed Description

SQL client - the main class.

Author
Daniel Simmons dan@d.nosp@m.ans..nosp@m.im 2010 Daniel Simmons http://www.opensource.org/licenses/mit-license.php

Definition at line 130 of file matrixsqlclient.php.

Constructor & Destructor Documentation

__construct (   $backend)

Constructor - initialises Matrix DAL and attempts to connect to database

Parameters
string$backendname of backend plugin to use to connect

Definition at line 180 of file matrixsqlclient.php.

__destruct ( )

Destructor function - should restore terminal settings

Definition at line 197 of file matrixsqlclient.php.

Member Function Documentation

autoComplete (   $hint)

Provides autocompletion for the given text.

Parameters
string$hintCurrent non-completed text string
Returns
string Autocomplete matches

Definition at line 445 of file matrixsqlclient.php.

cancel ( )

Attempt to cancel a currently-running query.

Definition at line 206 of file matrixsqlclient.php.

connect (   $dsn)

Connects the db backend

Parameters
string$dsnconnection string for database
Returns
true on success or false on failure

Definition at line 218 of file matrixsqlclient.php.

resetTerminal (   $save_existing = true)

Gets the terminal ready for our own use (switch it to raw mode).

Parameters
bool$save_existingwhether to save the existing terminal settings for restoring later.
Returns
void

Definition at line 502 of file matrixsqlclient.php.

restoreTerminal ( )

Restores the terminal to the previously saved state.

Returns
void

Definition at line 433 of file matrixsqlclient.php.

run ( )

Starts the main interactive terminal

Returns
void

Definition at line 228 of file matrixsqlclient.php.

setOption (   $option,
  $value 
)

Set an sqlclient option.

Parameters
string$optionname of the option
mixed$valueof the option
Returns
void

Definition at line 675 of file matrixsqlclient.php.


The documentation for this class was generated from the following file: