mhthnz / yii2-tarantool Goto Github PK
View Code? Open in Web Editor NEWTarantool connector for yii2 framework. Allows to use activerecord, schemas, widgets and more.
License: GNU General Public License v3.0
Tarantool connector for yii2 framework. Allows to use activerecord, schemas, widgets and more.
License: GNU General Public License v3.0
In \yii\console\controllers\MigrateController
we have the $useTablePrefix
setting, so similar setting is needed.
tarantool 2.8.2:
$ ./yii tarantool-migrate
Yii Migration Tool (based on Yii v2.0.44-dev)
No new migrations found. Your system is up-to-date.
tarantool 2.10.4:
$ ./yii tarantool-migrate
Yii Migration Tool (based on Yii v2.0.44-dev)
Exception 'Exception' with message 'At line 1 at or near position 63: keyword 'table' is reserved. Please use double quotes if 'table' is an identifier.
Failed to prepare SQL: select "format", "id", "engine" from "_space" where "name" = :table'
in /var/www/project/vendor/mhthnz/yii2-tarantool/src/Command.php:231
Caused by: Exception 'Tarantool\Client\Exception\RequestFailed' with message 'At line 1 at or near position 63: keyword 'table' is reserved. Please use double quotes if 'table' is an identifier.'
in /var/www/project/vendor/tarantool/client/src/Exception/RequestFailed.php:32
Stack trace:
#0 /var/www/project/vendor/tarantool/client/src/Handler/DefaultHandler.php(48): Tarantool\Client\Exception\RequestFailed::fromErrorResponse()
#1 /var/www/project/vendor/tarantool/client/src/Handler/MiddlewareHandler.php(63): Tarantool\Client\Handler\DefaultHandler->handle()
#2 /var/www/project/vendor/mhthnz/yii2-tarantool/src/LastInsertIDMiddleware.php(43): Tarantool\Client\Handler\MiddlewareHandler->handle()
#3 /var/www/project/vendor/tarantool/client/src/Handler/MiddlewareHandler.php(69): mhthnz\tarantool\LastInsertIDMiddleware->process()
#4 /var/www/project/vendor/tarantool/client/src/Middleware/AuthenticationMiddleware.php(41): Tarantool\Client\Handler\MiddlewareHandler->handle()
#5 /var/www/project/vendor/tarantool/client/src/Handler/MiddlewareHandler.php(69): Tarantool\Client\Middleware\AuthenticationMiddleware->process()
#6 /var/www/project/vendor/tarantool/client/src/Middleware/RetryMiddleware.php(75): Tarantool\Client\Handler\MiddlewareHandler->handle()
#7 /var/www/project/vendor/tarantool/client/src/Handler/MiddlewareHandler.php(69): Tarantool\Client\Middleware\RetryMiddleware->process()
#8 /var/www/project/vendor/tarantool/client/src/Client.php(221): Tarantool\Client\Handler\MiddlewareHandler->handle()
#9 /var/www/project/vendor/mhthnz/yii2-tarantool/src/Client.php(218): Tarantool\Client\Client->prepare()
#10 /var/www/project/vendor/mhthnz/yii2-tarantool/src/Command.php(228): mhthnz\tarantool\Client->__call()
#11 /var/www/project/vendor/mhthnz/yii2-tarantool/src/Command.php(297): mhthnz\tarantool\Command->prepare()
#12 /var/www/project/vendor/mhthnz/yii2-tarantool/src/Command.php(73): mhthnz\tarantool\Command->queryInternal()
#13 /var/www/project/vendor/mhthnz/yii2-tarantool/src/Schema.php(148): mhthnz\tarantool\Command->queryOne()
#14 /var/www/project/vendor/yiisoft/yii2/db/Schema.php(758): mhthnz\tarantool\Schema->loadTableSchema()
#15 /var/www/project/vendor/mhthnz/yii2-tarantool/src/Schema.php(596): yii\db\Schema->getTableMetadata()
#16 /var/www/project/vendor/mhthnz/yii2-tarantool/src/console/MigrateController.php(114): mhthnz\tarantool\Schema->getTableSchema()
#17 /var/www/project/vendor/yiisoft/yii2/console/controllers/BaseMigrateController.php(908): mhthnz\tarantool\console\MigrateController->getMigrationHistory()
#18 /var/www/project/vendor/yiisoft/yii2/console/controllers/BaseMigrateController.php(183): yii\console\controllers\BaseMigrateController->getNewMigrations()
#19 [internal function]: yii\console\controllers\BaseMigrateController->actionUp()
Можно поднять версию https://github.com/tarantool-php/client до ^0.10.0 и https://github.com/tarantool-php/client до ^0.9.1 для улучшения совместимости с php 8.1+
"require": {
"php": "^7.2.5|^8",
"yiisoft/yii2": "~2.0.35",
"tarantool/client": "^0.10.0",
"rybakit/msgpack": "^0.9.1"
},
и внести изменения в файл src/Connection.php
Удалить строку: use MessagePack\TypeTransformer\BinTransformer;
Удалить строку: use MessagePack\TypeTransformer\CanPack;
Добавить строку: use MessagePack\TypeTransformer\StreamTransformer;
Удалить строку: return $clientClass::fromDsn($this->dsn, $this->getPacker([new BinTransformer()]))
Добавить строку: return $clientClass::fromDsn($this->dsn, $this->getPacker([new StreamTransformer()]))
Удалить строку: * @param array<int, CanPack> $transformers
Добавить строку: * @param array<int, StreamTransformer> $transformers
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.