ygrek / sqlgg

SQL Guided (code) Generator
https://ygrek.org/p/sqlgg/
GNU General Public License v2.0
62 stars 20 forks source link

Possibility to set type of params manually #122

Closed jongleb closed 11 months ago

jongleb commented 11 months ago

Now we can specify parameters with the type with the following syntax: (@param_name :: Type) or (@param_name :: Type Null) if param is nullable.

Example:

Schema:

CREATE TABLE test (x INT NULL DEFAULT 0) ENGINE=MyISAM DEFAULT CHARSET=utf8

And query

SELECT * FROM test WHERE x = (@x_arg :: Int)