prisma / quaint

SQL Query AST and Visitor for Rust
Apache License 2.0
583 stars 61 forks source link

Support set variables #330

Open cprieto opened 2 years ago

cprieto commented 2 years ago

Support set variables for certain SQL dialects.

SQL Server cannot set a variable without declaring it first:

DECLARE @variable INT;
SET @variable = 1;

In MySQL, the prefix @ is optional while in SQL Server is required.

SQLite does not support setting variables.