Returning the object that is inserted or just the ID
Closed this issue · 1 comments
sahilpaudel-pe commented
Can I access the row that is inserted
conn
|> Xandra.execute!(prepared, %{
"async_id" => async_id,
"facts" => Poison.encode!(facts),
"result_set" => Poison.encode!(result_set),
"rule_set_version_id" => String.to_integer(rule_set_version_id)
})
|> play_with_inserted_id
My Table
CREATE table audit_log_keyspace.rules_engine_audit_logs
(
id timeuuid,
facts text,
result_set text,
async_id uuid,
rule_set_version_id int,
inserted_at timestamp,
created_at timestamp,
PRIMARY KEY (id)
);"
How can I access just inserted data from above.
whatyouhide commented
An INSERT
operation returns a void response. You have the async_id
there, you ought to be able to read the row with that.
In general, we reserve the issue tracker for issues. For questions, places like ElixirForum are more suited and you'll likely find it easier to get some help there 👍
In any case, closing this as there's no issue with Xandra per se highlighted here. Thanks @sahilpaudel-pe! 💟