ORMDriverInterface Interface Reference

Defines required operations for a Ninja ORM data source (for example, a RDBMS or a particular file format). More...

Inheritance diagram for ORMDriverInterface:
ORMDriverLS ORMDriverNative ORMDriverSQL ORMDriverYAML ORMDriverMySQL ORMDriverPgSQL

Public Member Functions

 count ($table, $structure, $filter)
 Get the number of objects in a table that matches a given filter.
 it ($table, $structure, $filter, $columns, $order=array(), $limit=false, $offset=false)
 Get the objects in a table that matches a given filter.
 stats ($table, $structure, $filter, $intersections)
 Returns an arbitrary (driver-specific) status summary of this table.
 update ($table, $structure, $filter, $values)
 Update one or more objects in a table matching a filter with a given set of values.
 delete ($table, $structure, $filter)
 Delete objects matching a given filter from a table.
 insert_single ($table, $structure, $values)
 Insert an object into a specified table.

Detailed Description

Defines required operations for a Ninja ORM data source (for example, a RDBMS or a particular file format).


Member Function Documentation

ORMDriverInterface::count ( table,
structure,
filter 
)

Get the number of objects in a table that matches a given filter.

Parameters:
$table string The table to perform the count on
$structure array An associative array describing this table
$filter LivestatusFilterBase The filter
Returns:
int The number of objects in $table matching $filter

Implemented in ORMDriverLS, ORMDriverNative, ORMDriverSQL, and ORMDriverYAML.

ORMDriverInterface::delete ( table,
structure,
filter 
)

Delete objects matching a given filter from a table.

Parameters:
$table string The table to delete from
$structure array An associative array describing this table
$filter LivestatusFilterBase The filter
Returns:
void

Implemented in ORMDriverLS, ORMDriverNative, ORMDriverSQL, and ORMDriverYAML.

ORMDriverInterface::insert_single ( table,
structure,
values 
)

Insert an object into a specified table.

Parameters:
$table string The table to insert the object into
$structure array An associative array describing this table
$values array A mapping from fields to values
Returns:
mixed An identifier for the inserted object, which should be unique to this driver/table combination

Implemented in ORMDriverLS, ORMDriverNative, ORMDriverSQL, and ORMDriverYAML.

ORMDriverInterface::it ( table,
structure,
filter,
columns,
order = array(),
limit = false,
offset = false 
)

Get the objects in a table that matches a given filter.

Parameters:
$table string The table to perform the query on
$structure array An associative array describing this table
$filter LivestatusFilterBase The filter
$columns array An array of strings denoting the columns to expose in the iterator
$order array An array of strings denoting the columns to order by in the format "<column [asc|desc]>"
$limit int Upper bound on the number of objects in the returned iterator
$offset int Specifies the offset
Returns:
Iterator Iterator over the objects in $table matching $filter

Implemented in ORMDriverLS, ORMDriverNative, ORMDriverSQL, and ORMDriverYAML.

ORMDriverInterface::stats ( table,
structure,
filter,
intersections 
)

Returns an arbitrary (driver-specific) status summary of this table.

Parameters:
$table string The table
$structure array An associative array describing this table
$filter LivestatusFilterBase The filter
$intersections mixed
Todo:
document $intersections if you know what it does

Implemented in ORMDriverLS, ORMDriverNative, and ORMDriverSQL.

ORMDriverInterface::update ( table,
structure,
filter,
values 
)

Update one or more objects in a table matching a filter with a given set of values.

Parameters:
$table string The table to update
$structure array An associative array describing this table
$filter LivestatusFilterBase The filter
$values array A mapping from fields to values
Returns:
void

Implemented in ORMDriverLS, ORMDriverNative, ORMDriverSQL, and ORMDriverYAML.


The documentation for this interface was generated from the following file:
 All Data Structures Functions Variables

Generated on 19 Dec 2018 for ninja by  doxygen 1.6.1