l1xnan / py-inline-sql

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Inline SQL for Python

中文

Syntax highlight and format SQL strings embedded in Python strings.

Usage

  • Syntax highlighting: No configuration is required.
  • Format
    • Select SQL, right-click and select the 'Inline SQL Format' option.
    • Select SQL, open the command panel, select 'Inline SQL Format' action.

Python indentation can be handled automatically, example:

if cond:
    sql = """
    select * from demo1 union select * from demo2;
    """

After formatting:

# Bad:
if cond:
    sql = """
    select *
from demo1
union
select *
from demo2;
    """

# Good
if True:
    sql = """
    select *
    from demo1
    union
    select *
    from demo2;
    """

Extension Settings

Known Issues

Release Notes

1.0.0

Initial release of ...

1.0.1

Fixed issue #.

1.1.0

Added features X, Y, and Z.

Related

About

License:MIT License


Languages

Language:TypeScript 69.2%Language:JavaScript 19.2%Language:HTML 11.6%