dev-master
9999999-dev https://bitbucket.org/vuebix/tarantoolPHP Tarantool adapter for Bitrix.
MIT
The Requires
- php >=7.1
- ext-tarantool *
by Mikhail Kriachek
bitrix nosql adapter tarantool
Wallogit.com
2017 © Pedro Peláez
PHP Tarantool adapter for Bitrix.
This version of client requires Tarantool 1.8.2 or above and PECL PHP driver for Tarantool, (*1)
Note, (*2)
This library is an example of integration Tarantool with Bitrix.
Strongly NOT RECOMMEND to use on production environment, (*3)
The recommended way to install the library is through Composer:, (*4)
$ composer require vuebix/tarantool:@dev
Add new connection to /bitrix/.settings.php, (*5)
'tarantool' =>
array (
'className' => '\\Vuebix\\DB\\TarantoolConnection',
'port': 3301,
'host' => '<tarantool>',
'login' => '<login>',
'password' => '<password>',
'sid' => 'tarantool',
),
<?php
namespace Test{
use Bitrix\Main\Entity;
class DemoTable extends Entity\DataManager{
public static function getConnectionName(){
return 'tarantool';
}
public static function getTableName(){
return 'table';
}
public static function getMap(){
return [
new Entity\IntegerField('ID', [
'primary' => true,
'autocomplete' => true
]),
new Entity\StringField('NAME'),
];
}
}
}
<?php // Get All records $result = \Test\DemoTable::getList()->fetchAll(); var_dump($result); // Get record $result = \Test\DemoTable::getById($id)->fetch(); var_dump($result); // Add new record $result = \Test\DemoTable::add($data); var_dump($result->isSuccess()); // Update record \Test\DemoTable::update($id, ['NAME' => $name]); var_dump($result->isSuccess()); // Delete record $result = \Test\DemoTable::delete($id); var_dump($result->isSuccess());
The library is released under the MIT License. See the bundled LICENSE file for details., (*6)
PHP Tarantool adapter for Bitrix.
MIT
bitrix nosql adapter tarantool