Open kkorsakov opened 6 years ago
This is not implemented yet. Only those spaces created using SQL itself might be queried. We're now working on support of making well-formatted spaces visible from SQL. Well-formatted means at least:
Only those fields will be accessible from SQL which are defined in space_format.
@kkorsakov So, basically you need to wait for this feature to land in the tarantool 1.8. After that you'll be able to perform the queries as you describe.
I'll leave the ticket open for now.
Ok, thanks!
Step to reproduce:
Create space and insert documents as in sample tarantool> box.schema.create_space('TEST_DOC', {if_not_exists = true}) tarantool> doc.create_index(box.space.TEST_DOC, 'primary',{parts={'id', 'unsigned'}, if_not_exists=true}) tarantool> doc.insert(box.space.TEST_DOC, {id=1, foo="foo", bar={baz=3}})
Verify that data is inserted tarantool> for _, r in doc.select(box.space.TEST_DOC) do print('tuple:', json.encode(r)) end
Expected: tuples with documents.
Actual: SQL error
Additional data: tarantool> box.sql.execute([[SELECT * FROM _space;]])
tarantool> box.info.version