Download the PHP package dimajolkin/ydb-php-sdk without Composer
On this page you can find all versions of the php package dimajolkin/ydb-php-sdk. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download dimajolkin/ydb-php-sdk
More information about dimajolkin/ydb-php-sdk
Files in dimajolkin/ydb-php-sdk
Package ydb-php-sdk
Short Description Yandex Database SDK (PHP)
License Apache-2.0
Informations about the package ydb-php-sdk
Об этом форке
Так как в облаке по видимому забили на поддержку библиотеки, временно перенёс в эту ветку нужные изменения для установки использовать
- https://github.com/bashkarev/ydb-php-sdk/tree/anonymous - возможность ананимной авторизации
- https://github.com/yandex-cloud/ydb-php-sdk/pull/22
YDB PHP SDK provides access to Yandex Database cloud services from PHP code.
Yandex Database is a distributed fault-tolerant DBMS with high availability and scalability, strict consistency and ACID. An SQL dialect – YQL – is used for queries.
Yandex Database is available in two modes:
- Serverless computing mode (only performed operations are paid);
- Dedicated instance mode (dedicated computing resources are paid).
Documentation
https://cloud.yandex.ru/docs/ydb/
Installation
The recommended method of installing is Composer.
Run the following:
Connection
First, create a database using Yandex Cloud Console.
Yandex Database supports the following authentication methods:
- OAuth token
- JWT + private key
- JWT + JSON file
- Metadata URL
- Anonymous
OAuth token
You should obtain a new OAuth token.
Use your OAuth token:
JWT + private key
Create a service account with the editor
role, then create a private key. Also you need a key ID and a service account ID.
Connect to your database:
JWT + JSON file
Create a service account with the editor
role.
Create a service account JSON file, save it in your project as sa_name.json
.
Connect to your database:
Metadata URL
When you deploy a project to VM or function at Yandex.Cloud, you are able to connect to the database using Metadata URL. Before you start, you should link your service account to an existing or new VM or function.
Anonymous
Usage
You should initialize a session from the Table service to start querying.
Also, you may call the query()
method directly on the Table service. In this case a session will be created behind the scenes, and it will proxy your query to the session.
As soon as your script is finished, the session will be destroyed.
Customizing queries
Normally, a regular query through the query()
method is sufficient, but in exceptional cases, you may need to fine-tune the query settings. You could do it using the query builder:
Methods of the query builder:
keepInCache(bool $value)
- keep in cache (default:true
)collectStats(int $value)
- collect stats (default: 1)parameters(array $parameters)
- parametersoperationParams(\Ydb\Operations\OperationParams $operation_params)
- operation paramsbeginTx(string $mode)
- begin a transaction with the given mode:- stale
- online
- online_inconsistent
- serializable
txControl(\Ydb\Table\TransactionControl $tx_control)
- transaction control with custom settings
You can chain these methods for convenience.
All versions of ydb-php-sdk with dependencies
ext-bcmath Version *
ext-curl Version *
ext-grpc Version *
ext-json Version *
google/protobuf Version ~3.15.8
grpc/grpc Version ^1.35
lcobucci/jwt Version ^4.1.5
phpseclib/phpseclib Version ^2.0|^3.0
psr/log Version ^1|^2|^3