LetsMelon / tsql

SQL with a little bit extra sugar on top and blazingly fast ✨
Apache License 2.0
1 stars 0 forks source link
parser sql

tsql

SQL with a little bit extra sugar on top and blazingly fast ✨

(no specs, no finished cli BUT under active development)


How to use the cli

  1. Build with cargo build --release
  2. Create test.tsql and insert content
@primary_key(id)
table Human {
    int id,
    varchar(32) name,
    date birth,
};

@primary_key(start, end)
table Termin {
    datetime start,
    datetime end,
    varchar(16) description,
};

@primary_key(human_id, termin_start, termin_end)
table has_appointment {
    @foreign_key()
    Human human,
    @foreign_key()
    Termin termin,
};
  1. Move executable mv ./target/release/tsql ./tsql
  2. Run executable ./tsql ./test.tsql out.sql
  3. Inspect your generated sql file

Examples

Look into /examples or /tests/files but be aware that because of active development, the parsing status can change a any moment in time.