Skip to content

Can not nested command in json object #58

@krist7599555

Description

@krist7599555

can not using reql::Command in serde:json! because serde::Serialize behavior

let command = r
  .table("users")
  .insert(json!({
    "id": r.uuid(),    // error
    "age": r.expr(16), // error
    "created": r.now() // error
  }));

this problem also hard to solve because we can not serialize json multiple time in rethinkdb

// original body
{ "tags": ["love", "boy", "hate"] }

// after serialize query
{ "tags": [2, ["love", "boy", "hate"]]}

i also try another approch like using r.object([["key", "value"], ["key2", r.uuid()]]) and r.hashMap is not implemented yet.

any suggestion on this please.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions