Neevo Public API
  • Namespace
  • Class
  • Tree

Namespaces

  • Neevo
    • Nette
  • None
  • PHP

Classes

  • Neevo
  • NeevoBaseStmt
  • NeevoCacheFile
  • NeevoCacheMemcache
  • NeevoCacheMemory
  • NeevoCacheSession
  • NeevoConnection
  • NeevoDriverMySQL
  • NeevoDriverMySQLi
  • NeevoDriverPgSQL
  • NeevoDriverSQLite2
  • NeevoDriverSQLite3
  • NeevoLiteral
  • NeevoLoader
  • NeevoObserverMap
  • NeevoParser
  • NeevoResult
  • NeevoResultIterator
  • NeevoRow
  • NeevoStmt

Interfaces

  • INeevoCache
  • INeevoDriver
  • INeevoObservable
  • INeevoObserver

Exceptions

  • NeevoDriverException
  • NeevoException
  • NeevoImplementationException

Class NeevoDriverSQLite3

Neevo SQLite 3 driver (PHP extension 'sqlite3')

Driver configuration: - database (or file) - memory (bool) => use an in-memory database (overrides 'database') - charset => Character encoding to set (defaults to utf-8) - dbcharset => Database character encoding (will be converted to 'charset')
- updateLimit (bool) => Set TRUE if SQLite driver was compiled with SQLITE_ENABLE_UPDATE_DELETE_LIMIT - resource (instance of SQLite3) => Existing SQLite 3 link - lazy, table_prefix => see NeevoConnection

Since SQLite 3 only allows unbuffered queries, number of result rows and seeking is not supported for this driver.

NeevoParser
Extended by NeevoDriverSQLite3 implements INeevoDriver
Package: Neevo\Drivers
Author: Martin Srank
Located at neevo/drivers/sqlite3.php

Methods summary

public
# __construct( NeevoBaseStmt $statement = null )

Check for required PHP extension.

Check for required PHP extension.

Parameters

$statement
NeevoBaseStmt
$statement

Throws

NeevoDriverException

Overrides

NeevoParser::__construct

Implementation of

INeevoDriver::__construct()
public
# connect( array $config )

Create connection to database.

Create connection to database.

Parameters

$config
array
$config Configuration options

Throws

NeevoException

Implementation of

INeevoDriver::connect()
public
# closeConnection( )

Close the connection.

Close the connection.

Implementation of

INeevoDriver::closeConnection()
public boolean
# freeResultSet( SQLite3Result $resultSet )

Free memory used by given result.

Free memory used by given result.

NeevoResult automatically NULLs the resource, so this is not necessary.

Parameters

$resultSet
SQLite3Result
$resultSet

Returns

boolean

Implementation of

INeevoDriver::freeResultSet()
public SQLite3Result|boolean
# runQuery( string $queryString )

Execute given SQL statement.

Execute given SQL statement.

Parameters

$queryString
string
$queryString

Returns

SQLite3Result|boolean

Throws

NeevoException

Implementation of

INeevoDriver::runQuery()
public
# beginTransaction( string $savepoint = null )

Begin a transaction if supported.

Begin a transaction if supported.

Parameters

$savepoint
string
$savepoint

Implementation of

INeevoDriver::beginTransaction()
public
# commit( string $savepoint = null )

Commit statements in a transaction.

Commit statements in a transaction.

Parameters

$savepoint
string
$savepoint

Implementation of

INeevoDriver::commit()
public
# rollback( string $savepoint = null )

Rollback changes in a transaction.

Rollback changes in a transaction.

Parameters

$savepoint
string
$savepoint

Implementation of

INeevoDriver::rollback()
public array
# fetch( SQLite3Result $resultSet )

Fetch row from given result set as an associative array.

Fetch row from given result set as an associative array.

Parameters

$resultSet
SQLite3Result
$resultSet

Returns

array

Implementation of

INeevoDriver::fetch()
public boolean
# seek( SQLite3Result $resultSet, integer $offset )

Move internal result pointer.

Move internal result pointer.

Not supported because of unbuffered queries.

Parameters

$resultSet
SQLite3Result
$resultSet
$offset
integer
$offset

Returns

boolean

Throws

NeevoDriverException

Implementation of

INeevoDriver::seek()
public integer
# getInsertId( )

Get the ID generated in the INSERT statement.

Get the ID generated in the INSERT statement.

Returns

integer

Implementation of

INeevoDriver::getInsertId()
public
# randomizeOrder( NeevoBaseStmt $statement )

Randomize result order.

Randomize result order.

Parameters

$statement
NeevoBaseStmt
$tatement

Implementation of

INeevoDriver::randomizeOrder()
public integer|false
# getNumRows( SQLite3Result $resultSet )

Get the number of rows in the given result set.

Get the number of rows in the given result set.

Not supported because of unbuffered queries.

Parameters

$resultSet
SQLite3Result
$resultSet

Returns

integer|false

Throws

NeevoDriverException

Implementation of

INeevoDriver::getNumRows()
public integer
# getAffectedRows( )

Get the umber of affected rows in previous operation.

Get the umber of affected rows in previous operation.

Returns

integer

Implementation of

INeevoDriver::getAffectedRows()
public mixed
# escape( mixed $value, string $type )

Escape given value.

Escape given value.

Parameters

$value
mixed
$value
$type
string
$type

Returns

mixed

Throws

InvalidArgumentException

Implementation of

INeevoDriver::escape()
public mixed
# unescape( mixed $value, string $type )

Decode given value.

Decode given value.

Parameters

$value
mixed
$value
$type
string
$type

Returns

mixed

Implementation of

INeevoDriver::unescape()
public string
# getPrimaryKey( string $table )

Get the PRIMARY KEY column for given table.

Get the PRIMARY KEY column for given table.

Parameters

$table
string
$table

Returns

string

Implementation of

INeevoDriver::getPrimaryKey()
public array
# getColumnTypes( SQLite3Result $resultSet, string $table )

Get types of columns in given result set.

Get types of columns in given result set.

Parameters

$resultSet
SQLite3Result
$resultSet
$table
string
$table

Returns

array

Implementation of

INeevoDriver::getColumnTypes()
protected string
# parseUpdateStmt( )

Parse UPDATE statement.

Parse UPDATE statement.

Returns

string

Overrides

NeevoParser::parseUpdateStmt
protected string
# parseDeleteStmt( )

Parse DELETE statement.

Parse DELETE statement.

Returns

string

Overrides

NeevoParser::parseDeleteStmt

Methods inherited from NeevoParser

applyLimit(), applyModifiers(), escapeValue(), parse(), parseFieldName(), parseGrouping(), parseInsertStmt(), parseSelectStmt(), parseSorting(), parseSource(), parseWhere(), tryDelimite()

Magic methods summary

Properties summary

Properties inherited from NeevoParser

$clauses, $stmt

Neevo Public API API documentation generated by ApiGen 2.8.0