snapshot of https://github.com/sqlc-dev/sqlc.git (main, 2026-09-16; blobs > 131072B omitted)
Some checks failed
kotlin / test (push) Has been skipped
python / test (push) Has been skipped
typescript / test (push) Has been skipped
go / build darwin/amd64 (push) Has been cancelled
go / build linux/amd64 (push) Has been cancelled
go / build windows/amd64 (push) Has been cancelled
go / build darwin/arm64 (push) Has been cancelled
go / build linux/arm64 (push) Has been cancelled
go / build windows/arm64 (push) Has been cancelled
go / test (push) Has been cancelled
go / vuln_check (push) Has been cancelled
Some checks failed
kotlin / test (push) Has been skipped
python / test (push) Has been skipped
typescript / test (push) Has been skipped
go / build darwin/amd64 (push) Has been cancelled
go / build linux/amd64 (push) Has been cancelled
go / build windows/amd64 (push) Has been cancelled
go / build darwin/arm64 (push) Has been cancelled
go / build linux/arm64 (push) Has been cancelled
go / build windows/arm64 (push) Has been cancelled
go / test (push) Has been cancelled
go / vuln_check (push) Has been cancelled
This commit is contained in:
84
internal/engine/mssql/dialect/dialect.json
Normal file
84
internal/engine/mssql/dialect/dialect.json
Normal file
@@ -0,0 +1,84 @@
|
||||
{
|
||||
"dialect": "mssql",
|
||||
"default_schema": "dbo",
|
||||
"const": {
|
||||
"integer": "int",
|
||||
"float": "float",
|
||||
"string": "varchar",
|
||||
"bool": "bit"
|
||||
},
|
||||
"bool": "bit",
|
||||
"comparison": ["=", "<>", "!=", "<", "<=", ">", ">="],
|
||||
"comparison_categories": "NBSD",
|
||||
"arithmetic": ["+", "-", "*", "/", "%"],
|
||||
"arithmetic_categories": "N",
|
||||
"cast_categories": "NSD",
|
||||
"idents": ["max"],
|
||||
"rewrites": [
|
||||
{
|
||||
"from": "sysname",
|
||||
"to": "nvarchar(128)"
|
||||
},
|
||||
{
|
||||
"from": "float($1)",
|
||||
"to": "real",
|
||||
"where": "$1 <= 24"
|
||||
},
|
||||
{
|
||||
"from": "float($1)",
|
||||
"to": "float"
|
||||
},
|
||||
{
|
||||
"from": "char",
|
||||
"to": "char(1)"
|
||||
},
|
||||
{
|
||||
"from": "varchar",
|
||||
"to": "varchar(1)"
|
||||
},
|
||||
{
|
||||
"from": "nchar",
|
||||
"to": "nchar(1)"
|
||||
},
|
||||
{
|
||||
"from": "nvarchar",
|
||||
"to": "nvarchar(1)"
|
||||
},
|
||||
{
|
||||
"from": "binary",
|
||||
"to": "binary(1)"
|
||||
},
|
||||
{
|
||||
"from": "varbinary",
|
||||
"to": "varbinary(1)"
|
||||
},
|
||||
{
|
||||
"from": "decimal",
|
||||
"to": "decimal(18, 0)"
|
||||
},
|
||||
{
|
||||
"from": "decimal($1)",
|
||||
"to": "decimal($1, 0)"
|
||||
},
|
||||
{
|
||||
"from": "numeric",
|
||||
"to": "numeric(18, 0)"
|
||||
},
|
||||
{
|
||||
"from": "numeric($1)",
|
||||
"to": "numeric($1, 0)"
|
||||
},
|
||||
{
|
||||
"from": "datetime2",
|
||||
"to": "datetime2(7)"
|
||||
},
|
||||
{
|
||||
"from": "time",
|
||||
"to": "time(7)"
|
||||
},
|
||||
{
|
||||
"from": "datetimeoffset",
|
||||
"to": "datetimeoffset(7)"
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user