You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
That would be a great feature. The protocol allows this without string
manipulation by the client, but only in v3. We would need to support it
first (#22).
QUERY, EXECUTE and BATCH messages can now optionally provide the names
for the values of the query. As this feature is optionally enabled by
clients, implementing it is at the discretion of the client.
On Feb 2, 2015 9:56 PM, "thibaultCha" notifications@github.com wrote:
Currently binding is only possible with ordered values:
local ok, err = session:execute([[ INSERT INTO users (name, age, user_id) VALUES (?, ?, ?)]], {"John O'Reilly", 42, cassandra.uuid("1144bada-852c-11e3-89fb-e0b9a54a6d11")})
If I want to bind a query from a table representing my entity, such as:
local user = {
name = "John O'Reilly",
age = 42,
user_id = cassandra.uuid("1144bada-852c-11e3-89fb-e0b9a54a6d11")
}
local ok, err = session:execute([[ INSERT INTO users (name, age, user_id) VALUES (?, ?, ?)]], user)
It won't be possible because user is not an ordered list corresponding to
the order of the ? placeholders.
Currently binding is only possible with ordered values:
If I want to bind a query from a table representing my entity, such as:
It won't be possible because user is not an ordered list corresponding to the order of the
?
placeholders.A very handy feature, proposed by the sqlite driver would be to bind values by name, such as:
Would such a feature be considered? Is it a limitation from Cassandra itself and if so, could simple string manipulation be considered?
The text was updated successfully, but these errors were encountered: