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

Allow creating index using binary representation #63

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

kid
Copy link

@kid kid commented Dec 10, 2021

While building an alternative import tool for rethinkdb using Rust, I
found myself trying to create index using the binary representation, as
exported by the official export tool.

However, the current implementation always wrap everything in a Func
so that didn't work, this PR is an attempt to fix that.

There's probably a better way to do this, but I'm not sure how.

While building an alternative import tool for rethinkdb using Rust, I
found myself trying to create index using the binary representation, as
exported by the official export tool.

However, the current implementation always wrap everything in a `Func`
so that didn't work, this PR is an attempt to fix that.

There's probably a better way to do this, but I'm not sure how.
@kid
Copy link
Author

kid commented Dec 10, 2021

I've confirmed this is working as expected using something like this

match r
    .db("foo")
    .table("bar")
    .index_create(r.args((
        "baz"
        json!({
            "$reql_type$": "BINARY",
            "data": "<base64>"
        }),
    )))
    .run::<_, ijson::IValue>(&conn)
    .try_next()
    .await?

@kid kid force-pushed the feat/index-create-binary branch 2 times, most recently from a1b7269 to 2bc51a2 Compare March 3, 2023 10:19
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

Successfully merging this pull request may close these issues.

1 participant