Tarantool connector for yii2 framework
Tarantool connector for yii2 framework. Allow to use framework abstractions such as ActiveRecord, Schema, TableSchema, Query, ActiveQuery and etc using tarantool database.
Documentation is here: docs/README.md
Reqirements
Installation
The preferred way to install this extension is through composer.
Either run
php composer.phar require --prefer-dist mhthnz/yii2-tarantool "*"
or add
"mhthnz/yii2-tarantool": "*"
to the require section of your composer.json
file.
Configuration
return [
'bootstrap' => ['debug'],
'components' => [
// Tarantool connection setup
'tarantool' => [
'class' => \mhthnz\tarantool\Connection::class,
'dsn' => 'tcp://username:password@localhost:3301/?connect_timeout=5&max_retries=3',
],
],
'modules' => [
//Debug panel setup
'debug' => [
'class' => 'yii\debug\Module',
'panels' => [
'tarantool' => [
'class' => \mhthnz\tarantool\debug\TarantoolPanel::class,
'db' => 'tarantool', // Tarantool component id
],
],
'allowedIPs' => ['127.0.0.1', '::1'],
],
],
];
Features
- Tarantool
Connection
hasCommand
andQueryBuilder
ActiveRecord
models withActiveQuery
supportSchema
abstraction,TableSchema
andColumnSchema
- Model validators
UniqueValidator
,ExistsValidator
- Data widgets like
DetailView
,ListView
,GridView
usingActiveDataProvider
- Debug panel with explain
- Migrations
Future plans
- Nosql query builder
- Lua validator
- I18n source
- Rbac db source
- Transactions
- Gii code generator (models, crud, queries)
- Connection slaves support
- Queue
- Cache
- Sessions