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 Neevo

Core Neevo class.

Neevo implements INeevoObservable, INeevoObserver
Package: Neevo
Author: Martin Srank
Located at neevo/Neevo.php

Methods summary

public
# __construct( mixed $config, INeevoCache $cache = null )

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

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

Parameters

$config
mixed
$config Connection configuration.
$cache
INeevoCache
$cache Cache to use.

Throws

NeevoException
public NeevoResult
# 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

NeevoResult
fluent interface
public NeevoStmt
# insert( string $table, array $values )

INSERT statement factory.

INSERT statement factory.

Parameters

$table
string
$table
$values
array
$values

Returns

NeevoStmt
fluent interface
public NeevoStmt
# update( string $table, array $data )

UPDATE statement factory.

UPDATE statement factory.

Parameters

$table
string
$table
$data
array
$data

Returns

NeevoStmt
fluent interface
public NeevoStmt
# delete( string $table )

DELETE statement factory.

DELETE statement factory.

Parameters

$table
string
$table

Returns

NeevoStmt
fluent interface
public integer
# loadFile( string $filename )

Import a SQL dump from given file.

Import a SQL dump from given file.

Based on implementation in Nette\Database, Copyright (c) 2004, 2011 David Grudl (http://davidgrudl.com), new BSD license.

Parameters

$filename
string
$filename

Returns

integer
Number of executed commands

Copyright

2004, 2011 David Grudl
public Neevo
# begin( string $savepoint = null )

Begin a transaction if supported.

Begin a transaction if supported.

Parameters

$savepoint
string
$savepoint

Returns

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

Commit statements in a transaction.

Commit statements in a transaction.

Parameters

$savepoint
string
$savepoint

Returns

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

Rollback changes in a transaction.

Rollback changes in a transaction.

Parameters

$savepoint
string
$savepoint

Returns

Neevo
fluent interface
public
# attachObserver( INeevoObserver $observer, integer $event )

Attach an observer for debugging.

Attach an observer for debugging.

Parameters

$observer
INeevoObserver
$observer
$event
integer
$event Event to attach the observer to.

Implementation of

INeevoObservable::attachObserver()
public
# detachObserver( INeevoObserver $observer )

Detach given observer.

Detach given observer.

Parameters

$observer
INeevoObserver
$observer

Implementation of

INeevoObservable::detachObserver()
public
# notifyObservers( integer $event )

Notify all observers attached to given event.

Notify all observers attached to given event.

Parameters

$event
integer
$event

Implementation of

INeevoObservable::notifyObservers()
public
# updateStatus( INeevoObservable $observable, integer $event )

Receive update from observable.

Receive update from observable.

Parameters

$observable
INeevoObservable
$observable
$event
integer
$event Event type

Implementation of

INeevoObserver::updateStatus()
public NeevoConnection
# getConnection( )

Current NeevoConnection instance.

Current NeevoConnection instance.

Returns

NeevoConnection
public string
# getLast( )

Last executed query.

Last executed query.

Returns

string
public integer
# getQueries( )

Get number of executed queries.

Get number of executed queries.

Returns

integer
public static string
# highlightSql( string $sql )

Highlight given SQL code.

Highlight given SQL code.

Parameters

$sql
string
$sql

Returns

string

Magic methods summary

Constants summary

string VERSION '1.3'
#
string REVISION '@VCREV@ released on @VCDATE@'
#
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 INeevoObserver

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