Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide sqlx magic #47

Merged

Conversation

nkitsaini
Copy link
Contributor

@nkitsaini nkitsaini commented Nov 26, 2024

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

sqlx/magic.py Outdated Show resolved Hide resolved
sqlx/magic.py Outdated Show resolved Hide resolved
sqlx/__init__.py Show resolved Hide resolved
@kesmit13 kesmit13 merged commit 8a3ee16 into singlestore-labs:main Dec 3, 2024
5 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants