singlestore-labs / singlestoredb-python

Python SDK for the SingleStore database and workspace management APIs
Apache License 2.0
22 stars 17 forks source link

Provide sqlx magic #47

Closed nkitsaini closed 22 hours ago

nkitsaini commented 1 week ago

The magic is just a thin wrapper over jupysql. After this change %load_ext sqlx can be used to load sqlx magic and can be used as regular %sql magic.

  # Line usage
  %sqlx SELECT * FROM mytable
  result = %sqlx SELECT 1

  # Cell usage
  %%sqlx
  DELETE FROM mytable
  %%sqlx
  DROP TABLE mytable