python-embeded-sql README
An extension for Visual Studio Code to embed SQL in Python code.
Features
Syntax Highlighting
Support python docstring with variable endwith sql
, like this:
sql = """
SELECT * FROM table WHERE id = 1
"""
or python single quoted string with variable endwith sql
, like this:
sql = 'SELECT * FROM table WHERE id = 1'
SQL Folding
suport SQL region folding, like this:
select
*
from (
-- region
select
uid
from user
-- endregion
union all
-- region
select
uid
from user
-- endregion
) a
;
Support folding SQL code block,
- indent folding
- region folding
like this:
sql = """
select
*
from (
-- region
select
uid
from user
-- endregion
union all
-- region
select
uid
from user
-- endregion
) a
"""
and
Enjoy!