Skip to content

Commit

Permalink
feat: add playground script for interactive database testing
Browse files Browse the repository at this point in the history
Generated-by: aiautocommit
  • Loading branch information
iloveitaly committed Feb 6, 2025
1 parent 7ef20ff commit fbe419a
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions playground.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/usr/bin/env -S uv tool run ipython -i

import sqlalchemy as sa
import sqlmodel as sm
from activemodel.session_manager import get_session
from test.models import *

from sqlmodel import SQLModel
from activemodel import get_engine
import activemodel
from test.utils import database_url

activemodel.init(database_url())

SQLModel.metadata.create_all(get_engine())

session = get_session()

"""
compile_sql(sm.select(AnotherExample).with_only_columns(sm.func.count()))
"""

0 comments on commit fbe419a

Please sign in to comment.