tarantool / vshard

The new generation of sharding based on virtual buckets
Other
100 stars 30 forks source link

How transfer function box.execute() in vshard.callro() function ? #289

Closed Bl4ugrane closed 3 years ago

Bl4ugrane commented 3 years ago

How i can transfer function box.execute([[SELECT * FROM TABLE;]]) used vshard.callro()?

Example: shards = vshard.router.routeall() for uid, replica in pairs(shards) do local set = replica:callro('box.execute([[SELECT * FROM TABLE;]])', { {}, {} }) end

olegrok commented 3 years ago

Simplified example

tarantool> rs:callro('box.execute', {'SELECT ?', {1}})
---
- {'metadata': [{'name': 'COLUMN_1', 'type': 'integer'}], 'rows': [[1]]}
- null
- null
...
Bl4ugrane commented 3 years ago

Thanks