Skip to content

Releases: coast-team/sqlschm

v0.1.0

10 Mar 15:48
1251c9a
Compare
Choose a tag to compare
v0.1.0 Pre-release
Pre-release
  • Basic support for parsing CREATE TABLE statement

    Expressions in DEFAULT and CHECK clauses are skipped.

    from sqlschm import parse_schema
    
    statement = """
    CREATE TABLE person(
        fullname text NOT NULL PRIMARY KEY
    );
    """
    
    schema = parse_schema(statement)
  • Basic support for generating CREATE TABLE from a schema

    Only SQLite dialect is available.

    from sqlschm import generate_schema, Dialect
    
    # schema is obtained from a parsing step
    out = generate_schema(schema, Dialect;SQLITE)