Neevo Public API
  • Namespace
  • Class
  • Tree

Namespaces

  • Neevo
    • Cache
    • Drivers
    • Nette
  • PHP

Classes

  • BaseStatement
  • Connection
  • Literal
  • Manager
  • Parser
  • Result
  • ResultIterator
  • Row
  • Statement

Interfaces

  • DriverInterface
  • ObservableInterface
  • ObserverInterface

Exceptions

  • DriverException
  • ImplementationException
  • NeevoException

Class Manager

Core Neevo class.

Neevo\Manager implements Neevo\ObservableInterface, Neevo\ObserverInterface
Namespace: Neevo
Author: Smasty
Located at Neevo/Manager.php

Methods summary

public
# __construct( mixed $config, Neevo\Cache\StorageInterface $cache = null )

Configures Neevo and establish a connection. Configuration can be different - see the API for your driver.

Configures Neevo and establish a connection. Configuration can be different - see the API for your driver.

Parameters

$config
mixed
$config Connection configuration.
$cache
Neevo\Cache\StorageInterface
$cache Cache to use.

Throws

Neevo\NeevoException
public Neevo\Result
# select( string|array $columns = null, string $table = null )

SELECT statement factory.

SELECT statement factory.

Parameters

$columns
string|array
$columns Array or comma-separated list (optional)
$table
string
$table

Returns

Neevo\Result
fluent interface
public Neevo\Statement
# insert( string $table, array|Traversable $values )

INSERT statement factory.

INSERT statement factory.

Parameters

$table
string
$table
$values
array|Traversable
$values

Returns

Neevo\Statement
fluent interface
public Neevo\Statement
# update( string $table, array|Traversable $data )

UPDATE statement factory.

UPDATE statement factory.

Parameters

$table
string
$table
$data
array|Traversable
$data

Returns

Neevo\Statement
fluent interface
public Neevo\Statement
# delete( string $table )

DELETE statement factory.

DELETE statement factory.

Parameters

$table
string
$table

Returns

Neevo\Statement
fluent interface
public integer
# loadFile( string $filename )

Imports a SQL dump from given file. Based on implementation in Nette\Database.

Imports a SQL dump from given file. Based on implementation in Nette\Database.

Parameters

$filename
string
$filename

Returns

integer
Number of executed commands

Copyright

2004-2012 David Grudl, http://davidgrudl.com

License

BSD license
public Neevo\Manager
# begin( string $savepoint = null )

Begins a transaction if supported.

Begins a transaction if supported.

Parameters

$savepoint
string
$savepoint

Returns

Neevo\Manager
fluent interface
public Neevo\Manager
# commit( string $savepoint = null )

Commits statements in a transaction.

Commits statements in a transaction.

Parameters

$savepoint
string
$savepoint

Returns

Neevo\Manager
fluent interface
public Neevo\Manager
# rollback( string $savepoint = null )

Rollbacks changes in a transaction.

Rollbacks changes in a transaction.

Parameters

$savepoint
string
$savepoint

Returns

Neevo\Manager
fluent interface
public
# attachObserver( Neevo\ObserverInterface $observer, integer $event )

Attaches an observer for debugging.

Attaches an observer for debugging.

Parameters

$observer
Neevo\ObserverInterface
$observer
$event
integer
$event Event to attach the observer to.

Implementation of

Neevo\ObservableInterface::attachObserver()
public
# detachObserver( Neevo\ObserverInterface $observer )

Detaches given observer.

Detaches given observer.

Parameters

$observer
Neevo\ObserverInterface
$observer

Implementation of

Neevo\ObservableInterface::detachObserver()
public
# notifyObservers( integer $event )

Notifies all observers attached to given event.

Notifies all observers attached to given event.

Parameters

$event
integer
$event

Implementation of

Neevo\ObservableInterface::notifyObservers()
public
# updateStatus( Neevo\ObservableInterface $subject, integer $event )

Receives update from observable subject.

Receives update from observable subject.

Parameters

$subject
Neevo\ObservableInterface
$subject
$event
integer
$event Event type

Implementation of

Neevo\ObserverInterface::updateStatus()
public Neevo\Connection
# getConnection( )

Returns current Connection instance.

Returns current Connection instance.

Returns

Neevo\Connection
public string
# getLast( )

Returns last executed query.

Returns last executed query.

Returns

string
public integer
# getQueries( )

Returns the number of executed queries.

Returns the number of executed queries.

Returns

integer
public static string
# highlightSql( string $sql )

Highlights given SQL code.

Highlights given SQL code.

Parameters

$sql
string
$sql

Returns

string

Magic methods summary

Constants summary

string VERSION '2.3.2'
#
string BOOL 'b'
#
string INT 'i'
#
string FLOAT 'f'
#
string TEXT 's'
#
string BINARY 'bin'
#
string DATETIME 'd'
#
string ARR 'a'
#
string LITERAL 'l'
#
string IDENTIFIER 'id'
#
string SUBQUERY 'sub'
#
string STMT_SELECT 'stmt_select'
#
string STMT_INSERT 'stmt_insert'
#
string STMT_UPDATE 'stmt_update'
#
string STMT_DELETE 'stmt_delete'
#
string JOIN_LEFT 'join_left'
#
string JOIN_INNER 'join_inner'
#
string ASC 'ASC'
#
string DESC 'DESC'
#

Constants inherited from Neevo\ObserverInterface

ALL, BEGIN, COMMIT, CONNECT, DELETE, DISCONNECT, EXCEPTION, INSERT, QUERY, ROLLBACK, SELECT, TRANSACTION, UPDATE

Properties summary

public static string $defaultDriver
#

Default Neevo driver

Default Neevo driver

Neevo Public API API documentation generated by ApiGen 2.8.0