tarantool-php / client

PHP client for Tarantool.
MIT License
67 stars 22 forks source link

Multiple insertion of rows in a single transaction #65

Closed yapro closed 4 years ago

yapro commented 4 years ago

Please, say, can I insert many rows in a one transaction.

rybakit commented 4 years ago

There are 2 options to do so:

1) You can create a Lua function that accepts and inserts multiple rows atomically and invoke it from the client via the call() method. For inspiration, check out this example from the tarantool/queue library, which shows how to insert multiple tasks into the queue in one call. 2) You can use the SQL INSERT statement with multiple comma-separated lists of values, check out this example for details.

For other support questions like this, please use the official Telegram channel (either Russian or English) or/and StackOverflow.