Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rewrite API. #3

Open
akhilman opened this issue Dec 29, 2019 · 1 comment
Open

Rewrite API. #3

akhilman opened this issue Dec 29, 2019 · 1 comment

Comments

@akhilman
Copy link
Owner

Space should be separate object.

Client::space_by_id(&Client, u32) -> Space
Client::space_by_name(&Client, &str) -> Space

To select space by name we should first fetch database schema. Here is how it done in asynctnt python driver:

Use new call protocol

#2

Define select's iterator types as enum

Here is right values: https://github.com/tarantool/tarantool/blob/952d8d1d4ffe81a0be4d7901f063f6c5059d71f5/src/box/iterator_type.h#L62

@akhilman
Copy link
Owner Author

akhilman commented Jan 8, 2020

Use build pattern for commands.

Something like:
client.call(&"func_name").arg(arg1).arg(arg_2).do().await
space.index_by_name(&"index_name").select().gt(value).limit(100).do().await
or
client.space_by_name(&"foo").select().by(&"index_nane").gt(value).limit(100).do().await

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant