Skip to content
/ JtSQL Public

An interpreter implemented with .Net Core for JtSQL

License

Notifications You must be signed in to change notification settings

jiruffe/JtSQL

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

JtSQL

An interpreter implemented with .Net Core for JtSQL

About JtSQL

To-do

  • Hello World
  • Lexer
  • Parser
  • SQL Executor

How-to

Chakilo.JtSQL.Run(new Chakilo.Linq.Work("Your JtSQL code here"));

Differences from JtSQL-for-Java

  • Using placeholder in sql().

    $<SELECT * FROM `user` WHERE user_id > {{0}} AND user_id < {{Math.abs(5)}};>

    will be compiled into

    sql("SELECT * FROM `user` WHERE user_id > ? AND user_id < ?;", 0, Math.abs(5))
  • Semicolons may be omitted.

    Both

    for (;;) {
        if (condition) {
            var result = $<SELECT * FROM {{table}};>;
        };
    };

    and

    for (;;) {if (condition) {var result = $<SELECT * FROM {{table}}>}}

    are avaliable.

  • Inline comments supported.

    // get id by username
    var user_id = $<SELECT user_id FROM `user` WHERE username = {{username}} LIMIT 1;>

Examples

See also noear/JtSQL

Dependencies

About

An interpreter implemented with .Net Core for JtSQL

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages