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
Is there a better way to find something by a name/id? This below works, but seems like the named parameter way should work too.
deffind(email)do# Works fine, but I want to use the key# Diplomat.Query.new("select * from `User` where email_address = @email", %{email: email} )"select * from User where __key__ = KEY(User, \"#{email}\")"|>Diplomat.Query.new|>Diplomat.Query.execute|>hdend
When I use the names params:
deffind2(email)doDiplomat.Query.new("select * from User where __key__ = KEY(User, @email)",%{email: email})|>Diplomat.Query.executeend
I get:
iex(1)>u=User.find2("[email protected]"){:error,%Diplomat.Proto.Status{code: 3,details: [],message: "Encountered \"@email\" at line 1, column 46.\nWas expecting one of:\n <INTEGER> ...\n <SINGLE_QUOTE_STRING> ...\n <DOUBLE_QUOTE_STRING> ...\n "}}iex(2)>
Semi-new to Google Data Store so I could be missing something simple.
Thanks!
The text was updated successfully, but these errors were encountered:
Is there a better way to find something by a name/id? This below works, but seems like the named parameter way should work too.
When I use the names params:
I get:
Semi-new to Google Data Store so I could be missing something simple.
Thanks!
The text was updated successfully, but these errors were encountered: