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
As expressed certain queries that are spec compliant have no parse state:
Example
For this have a valid database hosted on :8080 and have a table with a string value entry. For instance the query CREATE TABLE IF NOT EXISTS example (entry TEXT UNIQUE PRIMARY KEY) would work
importgleam/httpimportgleam/http/requestimportgleam/httpcimportgleam/ioimportglibsql/httpasglibsqlpubfnmain(){caseglibsql.new_request()|>glibsql.with_database("")|>glibsql.with_token("")|>glibsql.with_host("localhost:8080")|>glibsql.with_organization("")|>glibsql.with_statement(glibsql.new_statement()|>glibsql.with_query("SELECT exists(SELECT * FROM example WHERE entry=? COLLATE nocase)",)|>glibsql.with_argument(glibsql.AnonymousArgument(glibsql.Text("testing")),),)|>glibsql.with_statement(glibsql.CloseStatement)|>glibsql.build{Ok(req)->casehttpc.send(req// just a hack to force connection to a local server for testing, this does not effect functionality|>request.set_host("localhost:8080")|>request.set_scheme(http.Http),){Ok(res)->glibsql.decode_response(res.body)|>io.debugError(_)->panicas"Failed to send request"}Error(_)->panicas"Failed to build query"}}
The above example will return an Error(Nil) when a 0 is expected
The text was updated successfully, but these errors were encountered:
As expressed certain queries that are spec compliant have no parse state:
Example
For this have a valid database hosted on
:8080
and have a table with a string valueentry
. For instance the queryCREATE TABLE IF NOT EXISTS example (entry TEXT UNIQUE PRIMARY KEY)
would workThe above example will return an
Error(Nil)
when a 0 is expectedThe text was updated successfully, but these errors were encountered: