Свойство | Тип | Описание | |
---|---|---|---|
$_classes | array | Classes used by CouchDb. | |
$_db | boolean | True if Database exists. | |
$_handlers | |||
$_iterator | string | Increment value of current result set loop used by result to handle rows of json responses. |
Метод | Описание | |
---|---|---|
__call ( string $method, array $params = [] ) : mixed | Magic for passing methods to http service. | |
__construct ( array $config = [] ) : void | Constructor. | |
__destruct ( ) : void | Destructor. Ensures that the server connection is closed and resources are freed when the adapter instance is destroyed. | |
calculation ( string $type, mixed $query, array $options = [] ) : integer | Executes calculation-related queries, such as those required for count. | |
conditions ( string $conditions, string $context ) : array | Handle conditions. | |
configureClass ( string $class ) : Returns | Configures a model class by setting the primary key to 'id', in keeping with CouchDb conventions. | |
create ( string $query, array $options = [] ) : boolean | Create new document. | |
delete ( string $query, array $options = [] ) : boolean | Delete document. | |
describe ( string $entity, array $schema = [], array $meta = [] ) : lithium\data\Schema | Describe database, create if it does not exist. | |
enabled ( string $feature = null ) : boolean | With no parameter, always returns true, since CouchDB only depends on HTTP. With a parameter, queries for a specific supported feature. | |
fields ( string $fields, string $context ) : array | Fields for query. | |
item ( string $model, array $data = [], array $options = [] ) : object | Returns a newly-created Document object, bound to a model and populated with default data and options. | |
limit ( string $limit, string $context ) : array | Limit for query. | |
name ( string $name ) : string | Quotes identifiers. | |
order ( string $order, string $context ) : array | Order for query. | |
read ( string $query, array $options = [] ) : object | Read from document. | |
respondsTo ( string $method, boolean $internal = false ) : boolean | Determines if a given method can be called. | |
sources ( object $class = null ) : void | Returns an array of object types accessible through this database. | |
update ( string $query, array $options = [] ) : boolean | Update document. |
Метод | Описание | |
---|---|---|
_autoBuild ( string $result ) | Helper used for auto building a CouchDB database. | |
_format ( array $data ) : array | Formats a CouchDb result set into a standard result to be passed to item. | |
_init ( ) |
public __construct ( array $config = [] ) : void | ||
$config | array | Available configuration options are: - `'port'` _integer_ - `'version'` _integer_ - `'database'` _string_ |
Результат | void |
public __destruct ( ) : void | ||
Результат | void |
protected _autoBuild ( string $result ) | ||
$result | string | A query result. |
public calculation ( string $type, mixed $query, array $options = [] ) : integer | ||
$type | string | Only accepts `count`. |
$query | mixed | The query to be executed. |
$options | array | Optional arguments for the `read()` query that will be executed to obtain the calculation result. |
Результат | integer | Result of the calculation. |
public configureClass ( string $class ) : Returns | ||
$class | string | The fully-namespaced model class name to be configured. |
Результат | Returns | an array containing keys `'classes'` and `'meta'`, which will be merged with their respective properties in `Model`. |
public item ( string $model, array $data = [], array $options = [] ) : object | ||
$model | string | A fully-namespaced class name representing the model class to which the `Document` object will be bound. |
$data | array | The default data with which the new `Document` should be populated. |
$options | array | Any additional options to pass to the `Document`'s constructor |
Результат | object | Returns a new, un-saved `Document` object bound to the model class specified in `$model`. |
public respondsTo ( string $method, boolean $internal = false ) : boolean | ||
$method | string | Name of the method. |
$internal | boolean | Provide `true` to perform check from inside the class/object. When `false` checks also for public visibility; defaults to `false`. |
Результат | boolean | Returns `true` if the method can be called, `false` otherwise. |
protected string $_iterator | ||
Результат | string |