@@ -82,7 +82,6 @@ Place it into project library path in your IDE.
82823 . [ Manipulation connection] ( #manipulation-connection )
8383 * [ Tarantool::connect] ( #tarantoolconnect )
8484 * [ Tarantool::disconnect] ( #tarantooldisconnect )
85- * [ Tarantool::authenticate] ( #tarantoolauthenticate )
8685 * [ Tarantool::flushSchema] ( #tarantoolflushschema )
8786 * [ Tarantool::ping] ( #tarantoolping )
88874 . [ Database queries] ( #database-queries )
@@ -98,45 +97,44 @@ Place it into project library path in your IDE.
9897
9998_ ** Description** _ : Available Tarantool Constants
10099
101- * ` TARANTOOL_ITER_EQ ` - Equality iterator (ALL)
102- * ` TARANTOOL_ITER_REQ ` - Reverse equality iterator
103- * ` TARANTOOL_ITER_ALL ` - Get all rows
104- * ` TARANTOOL_ITER_LT ` - Less then iterator
105- * ` TARANTOOL_ITER_LE ` - Less and equal iterator
106- * ` TARANTOOL_ITER_GE ` - Greater and equal iterator
107- * ` TARANTOOL_ITER_GT ` - Gtreater then iterator
108- * ` TARANTOOL_ITER_BITSET_ALL_SET ` - check if all given bits are set (BITSET only)
109- * ` TARANTOOL_ITER_BITSET_ANY_SET ` - check if any given bits are set (BITSET only)
110- * ` TARANTOOL_ITER_BITSET_ALL_NOT_SET ` - check if all given bits are not set
100+ * ` Tarantool::ITERATOR_EQ ` - Equality iterator (ALL)
101+ * ` Tarantool::ITERATOR_REQ ` - Reverse equality iterator
102+ * ` Tarantool::ITERATOR_ALL ` - Get all rows
103+ * ` Tarantool::ITERATOR_LT ` - Less then iterator
104+ * ` Tarantool::ITERATOR_LE ` - Less and equal iterator
105+ * ` Tarantool::ITERATOR_GE ` - Greater and equal iterator
106+ * ` Tarantool::ITERATOR_GT ` - Gtreater then iterator
107+ * ` Tarantool::ITERATOR_BITSET_ALL_SET ` - check if all given bits are set (BITSET only)
108+ * ` Tarantool::ITERATOR_BITSET_ANY_SET ` - check if any given bits are set (BITSET only)
109+ * ` Tarantool::ITERATOR_BITSET_ALL_NOT_SET ` - check if all given bits are not set
111110 (BITSET only)
112- * ` TARANTOOL_ITER_OVERLAPS ` - find dots in the n-dimension cube (RTREE only)
113- * ` TARANTOOL_ITER_NEIGHBOR ` - find nearest dots (RTREE only)
111+ * ` Tarantool::ITERATOR_OVERLAPS ` - find dots in the n-dimension cube (RTREE only)
112+ * ` Tarantool::ITERATOR_NEIGHBOR ` - find nearest dots (RTREE only)
114113
115114### Class Tarantool
116115
117116``` php
118117Tarantool {
119- public Tarantool::__construct ( [ string $host = 'localhost' [, int $port = 3301 ] ] )
120- public bool Tarantool::connect ( void )
121- public bool Tarantool::disconnect ( void )
122- public Tarantool::authenticate(string $login [, string $password = NULL ] )
123- public bool Tarantool::flushSchema ( void )
124- public bool Tarantool::ping ( void )
125- public array Tarantool::select(mixed $space [, mixed $key = array() [, mixed $index = 0 [, int $limit = PHP_INT_MAX [, int $offset = 0 [, $iterator = TARANTOOL_ITER_EQ ] ] ] ] ] )
126- public array Tarantool::insert(mixed $space, array $tuple)
127- public array Tarantool::replace(mixed $space, array $tuple)
128- public array Tarantool::call(string $procedure [, mixed args])
129- public array Tarantool::evaluate(string $expression [, mixed args])
130- public array Tarantool::delete(mixed $space, mixed $key [, mixed $index])
131- public array Tarantool::update(mixed $space, mixed $key, array $ops [, number $index] )
132- public array Tarantool::upsert(mixed $space, mixed $key, array $ops [, number $index] )
118+ public Tarantool::__construct ( [ string $host = 'localhost' [, int $port = 3301 [, string $user = "guest" [, string $password = NULL [, string $persistent_id = NULL ] ] ] ] ] )
119+ public bool Tarantool::connect ( void )
120+ public bool Tarantool::disconnect ( void )
121+ public bool Tarantool::flushSchema ( void )
122+ public bool Tarantool::ping ( void )
123+ public array Tarantool::select (mixed $space [, mixed $key = array() [, mixed $index = 0 [, int $limit = PHP_INT_MAX [, int $offset = 0 [, $iterator = TARANTOOL_ITERATOR_EQ ] ] ] ] ] )
124+ public array Tarantool::insert (mixed $space, array $tuple)
125+ public array Tarantool::replace (mixed $space, array $tuple)
126+ public array Tarantool::call (string $procedure [, mixed args] )
127+ public array Tarantool::evaluate (string $expression [, mixed args] )
128+ public array Tarantool::delete (mixed $space, mixed $key [, mixed $index] )
129+ public array Tarantool::update (mixed $space, mixed $key, array $ops [, number $index] )
130+ public array Tarantool::upsert (mixed $space, mixed $key, array $ops [, number $index] )
133131}
134132```
135133
136134#### Tarantool::__ construct
137135
138136```
139- public Tarantool::__construct ( [ string $host = 'localhost' [, int $port = 3301 ] ] )
137+ public Tarantool::__construct ( [ string $host = 'localhost' [, int $port = 3301 [, string $user = "guest" [, string $password = NULL [, string $persistent_id = NULL ] ] ] ] ] )
140138```
141139
142140_ ** Description** _ : Creates a Tarantool client
@@ -145,6 +143,10 @@ _**Parameters**_
145143
146144* ` host ` : string, default is ` 'localhost' `
147145* ` port ` : number, default is ` 3301 `
146+ * ` user ` : string, default is ` 'guest' `
147+ * ` password ` : string
148+ * ` persistent_id ` : string (set it, and connection will be persistent, if
149+ ` persistent ` in config isn't set)
148150
149151_ ** Return Value** _
150152
@@ -187,36 +189,6 @@ _**Return Value**_
187189
188190** BOOL** : True
189191
190- ### Tarantool::authenticate
191-
192- ``` php
193- public Tarantool::authenticate(string $login [, string $password = NULL ] )
194- ```
195-
196- _ ** Description** _ : Authenticate to Tarantool using given login/password
197-
198- _ ** Parameters** _
199-
200- * ` login ` : string - user login (mandatory)
201- * ` password ` : string - user password (mandatory, but ignored, if user is guest)
202-
203- _ ** Return Value** _ NULL
204-
205- #### * Example*
206-
207- ``` php
208- /**
209- * - user is 'valdis'
210- * - password is 'pelsh'
211- */
212- $tnt->connect('valdis', 'pelsh')
213- /**
214- * - user is 'guest'
215- * - password is empty and ignored, anyway
216- */
217- $tnt->connect('guest')
218- ```
219-
220192### Tarantool::flushSchema
221193
222194``` php
@@ -248,7 +220,7 @@ Throws `Exception` on error.
248220### Tarantool::select
249221
250222``` php
251- public array Tarantool::select(mixed $space [, mixed $key = array() [, mixed $index = 0 [, int $limit = PHP_INT_MAX [, int $offset = 0 [, $iterator = TARANTOOL_ITER_EQ ] ] ] ] ] )
223+ public array Tarantool::select(mixed $space [, mixed $key = array() [, mixed $index = 0 [, int $limit = PHP_INT_MAX [, int $offset = 0 [, $iterator = TARANTOOL_ITERATOR_EQ ] ] ] ] ] )
252224```
253225
254226_ ** Description** _ : Execute select query from Tarantool server.
@@ -262,7 +234,7 @@ _**Parameters**_
262234* ` limit ` : Number, limit number of rows to return from select (INT_MAX by default)
263235* ` offset ` : Number, offset to select from (0 by default)
264236* ` iterator ` : Constant, iterator type. See [ Predefined Constants] ( #predefined-constants )
265- for more information (` TARANTOOL_ITER_EQ ` by default)
237+ for more information (` TARANTOOL_ITERATOR_EQ ` by default)
266238
267239_ ** Return Value** _
268240
@@ -286,7 +258,7 @@ $tnt->select("test", array(1, "hello"), "isec");
286258$tnt->select("test", null, null, 100, 100);
287259// Selects second hundred of rows from space test in reverse equality order
288260// It meanse: select penultimate hundred
289- $tnt->select("test", null, null, 100, 100, TARANTOOL_ITER_REQ );
261+ $tnt->select("test", null, null, 100, 100, TARANTOOL_ITERATOR_REQ );
290262```
291263
292264### Tarantool::insert, Tarantool::replace
0 commit comments