SpacetimeDB icon indicating copy to clipboard operation
SpacetimeDB copied to clipboard

CLI - Help text is wrong for `spacetime sql`

Open bfops opened this issue 1 year ago • 0 comments

The help text suggests providing the anonymous args in the wrong order:

$ spacetime sql
error: the following required arguments were not provided:
  <--interactive|query>
  <database>

Usage: spacetime sql <--interactive|query> <database>

For more information, try '--help'.

But the database name actually needs to come before the query, not after:

$ spacetime sql -s local 'select * from Person' test-module
Error: HTTP status client error (400 Bad Request) for url (http://127.0.0.1:3000/database/dns/select%20*%20from%20Person)

$ spacetime sql -s local test-module 'select * from Person'
 name 
------

bfops avatar Aug 07 '24 02:08 bfops