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:
1
internal/sql/preprocess/testdata/mysql/arg/input.sql
vendored
Normal file
1
internal/sql/preprocess/testdata/mysql/arg/input.sql
vendored
Normal file
@@ -0,0 +1 @@
|
||||
SELECT id FROM users WHERE a = sqlc.arg(x) AND b = sqlc.arg(x);
|
||||
1
internal/sql/preprocess/testdata/mysql/arg/output.sql
vendored
Normal file
1
internal/sql/preprocess/testdata/mysql/arg/output.sql
vendored
Normal file
@@ -0,0 +1 @@
|
||||
SELECT id FROM users WHERE a = ? AND b = ?;
|
||||
23
internal/sql/preprocess/testdata/mysql/arg/side_table.json
vendored
Normal file
23
internal/sql/preprocess/testdata/mysql/arg/side_table.json
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
[
|
||||
{
|
||||
"start": 0,
|
||||
"end": 43,
|
||||
"dollar": true,
|
||||
"params": [
|
||||
{
|
||||
"number": 1,
|
||||
"location": 31,
|
||||
"origin": 31,
|
||||
"name": "x",
|
||||
"named": true
|
||||
},
|
||||
{
|
||||
"number": 2,
|
||||
"location": 41,
|
||||
"origin": 51,
|
||||
"name": "x",
|
||||
"named": true
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
1
internal/sql/preprocess/testdata/mysql/dollar_number_is_not_a_placeholder/input.sql
vendored
Normal file
1
internal/sql/preprocess/testdata/mysql/dollar_number_is_not_a_placeholder/input.sql
vendored
Normal file
@@ -0,0 +1 @@
|
||||
SELECT * FROM second_view WHERE val2 = $1;
|
||||
1
internal/sql/preprocess/testdata/mysql/dollar_number_is_not_a_placeholder/output.sql
vendored
Normal file
1
internal/sql/preprocess/testdata/mysql/dollar_number_is_not_a_placeholder/output.sql
vendored
Normal file
@@ -0,0 +1 @@
|
||||
SELECT * FROM second_view WHERE val2 = $1;
|
||||
7
internal/sql/preprocess/testdata/mysql/dollar_number_is_not_a_placeholder/side_table.json
vendored
Normal file
7
internal/sql/preprocess/testdata/mysql/dollar_number_is_not_a_placeholder/side_table.json
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
[
|
||||
{
|
||||
"start": 0,
|
||||
"end": 42,
|
||||
"dollar": true
|
||||
}
|
||||
]
|
||||
4
internal/sql/preprocess/testdata/mysql/double_quoted_argument/input.sql
vendored
Normal file
4
internal/sql/preprocess/testdata/mysql/double_quoted_argument/input.sql
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
SELECT
|
||||
(CASE WHEN sqlc.arg("Timezone") = "calendar" THEN cal.Timezone ELSE sqlc.arg("Timezone") END),
|
||||
COALESCE(sqlc.narg("calName"), "")
|
||||
FROM Calendar cal;
|
||||
4
internal/sql/preprocess/testdata/mysql/double_quoted_argument/output.sql
vendored
Normal file
4
internal/sql/preprocess/testdata/mysql/double_quoted_argument/output.sql
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
SELECT
|
||||
(CASE WHEN ? = "calendar" THEN cal.Timezone ELSE ? END),
|
||||
COALESCE(?, "")
|
||||
FROM Calendar cal;
|
||||
31
internal/sql/preprocess/testdata/mysql/double_quoted_argument/side_table.json
vendored
Normal file
31
internal/sql/preprocess/testdata/mysql/double_quoted_argument/side_table.json
vendored
Normal file
@@ -0,0 +1,31 @@
|
||||
[
|
||||
{
|
||||
"start": 0,
|
||||
"end": 106,
|
||||
"dollar": true,
|
||||
"params": [
|
||||
{
|
||||
"number": 1,
|
||||
"location": 22,
|
||||
"origin": 22,
|
||||
"name": "Timezone",
|
||||
"named": true
|
||||
},
|
||||
{
|
||||
"number": 2,
|
||||
"location": 60,
|
||||
"origin": 79,
|
||||
"name": "Timezone",
|
||||
"named": true
|
||||
},
|
||||
{
|
||||
"number": 3,
|
||||
"location": 81,
|
||||
"origin": 119,
|
||||
"name": "calName",
|
||||
"named": true,
|
||||
"nullable": true
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
1
internal/sql/preprocess/testdata/mysql/embed/input.sql
vendored
Normal file
1
internal/sql/preprocess/testdata/mysql/embed/input.sql
vendored
Normal file
@@ -0,0 +1 @@
|
||||
SELECT sqlc.embed(users) FROM users;
|
||||
1
internal/sql/preprocess/testdata/mysql/embed/output.sql
vendored
Normal file
1
internal/sql/preprocess/testdata/mysql/embed/output.sql
vendored
Normal file
@@ -0,0 +1 @@
|
||||
SELECT users.* FROM users;
|
||||
15
internal/sql/preprocess/testdata/mysql/embed/side_table.json
vendored
Normal file
15
internal/sql/preprocess/testdata/mysql/embed/side_table.json
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
[
|
||||
{
|
||||
"start": 0,
|
||||
"end": 26,
|
||||
"dollar": true,
|
||||
"embeds": [
|
||||
{
|
||||
"table": "users",
|
||||
"location": 7,
|
||||
"origin": 7,
|
||||
"orig": "sqlc.embed(users)"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
11
internal/sql/preprocess/testdata/mysql/error_invalid_calls/input.sql
vendored
Normal file
11
internal/sql/preprocess/testdata/mysql/error_invalid_calls/input.sql
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
-- name: WrongFunc :one
|
||||
SELECT id FROM users WHERE id = sqlc.argh(target_id);
|
||||
|
||||
-- name: TooManyArgs :one
|
||||
SELECT id FROM users WHERE id = sqlc.arg('foo', 'bar');
|
||||
|
||||
-- name: TooFewArgs :one
|
||||
SELECT id FROM users WHERE id = sqlc.arg();
|
||||
|
||||
-- name: InvalidArgPlaceholder :one
|
||||
SELECT id FROM users WHERE id = sqlc.arg(?);
|
||||
11
internal/sql/preprocess/testdata/mysql/error_invalid_calls/output.sql
vendored
Normal file
11
internal/sql/preprocess/testdata/mysql/error_invalid_calls/output.sql
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
-- name: WrongFunc :one
|
||||
SELECT id FROM users WHERE id = sqlc.argh(target_id);
|
||||
|
||||
-- name: TooManyArgs :one
|
||||
SELECT id FROM users WHERE id = sqlc.arg('foo', 'bar');
|
||||
|
||||
-- name: TooFewArgs :one
|
||||
SELECT id FROM users WHERE id = sqlc.arg();
|
||||
|
||||
-- name: InvalidArgPlaceholder :one
|
||||
SELECT id FROM users WHERE id = sqlc.arg(?);
|
||||
30
internal/sql/preprocess/testdata/mysql/error_invalid_calls/side_table.json
vendored
Normal file
30
internal/sql/preprocess/testdata/mysql/error_invalid_calls/side_table.json
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
[
|
||||
{
|
||||
"start": 0,
|
||||
"end": 77,
|
||||
"dollar": true,
|
||||
"error": "function \"sqlc.argh\" does not exist",
|
||||
"error_at": 56
|
||||
},
|
||||
{
|
||||
"start": 77,
|
||||
"end": 160,
|
||||
"dollar": true,
|
||||
"error": "expected 1 parameter to sqlc.arg; got 2",
|
||||
"error_at": 137
|
||||
},
|
||||
{
|
||||
"start": 160,
|
||||
"end": 230,
|
||||
"dollar": true,
|
||||
"error": "expected 1 parameter to sqlc.arg; got 0",
|
||||
"error_at": 219
|
||||
},
|
||||
{
|
||||
"start": 230,
|
||||
"end": 312,
|
||||
"dollar": true,
|
||||
"error": "expected parameter to sqlc.arg to be string or reference; got \"?\"",
|
||||
"error_at": 300
|
||||
}
|
||||
]
|
||||
4
internal/sql/preprocess/testdata/mysql/error_invalid_calls/stderr.txt
vendored
Normal file
4
internal/sql/preprocess/testdata/mysql/error_invalid_calls/stderr.txt
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
2:33: function "sqlc.argh" does not exist
|
||||
5:33: expected 1 parameter to sqlc.arg; got 2
|
||||
8:33: expected 1 parameter to sqlc.arg; got 0
|
||||
11:33: expected parameter to sqlc.arg to be string or reference; got "?"
|
||||
1
internal/sql/preprocess/testdata/mysql/existing_placeholders_are_numbered_together/input.sql
vendored
Normal file
1
internal/sql/preprocess/testdata/mysql/existing_placeholders_are_numbered_together/input.sql
vendored
Normal file
@@ -0,0 +1 @@
|
||||
SELECT id FROM users WHERE a = ? AND b = sqlc.arg(x) AND c = ?;
|
||||
@@ -0,0 +1 @@
|
||||
SELECT id FROM users WHERE a = ? AND b = ? AND c = ?;
|
||||
@@ -0,0 +1,28 @@
|
||||
[
|
||||
{
|
||||
"start": 0,
|
||||
"end": 53,
|
||||
"dollar": false,
|
||||
"params": [
|
||||
{
|
||||
"number": 1,
|
||||
"location": 31,
|
||||
"origin": 31,
|
||||
"named": false
|
||||
},
|
||||
{
|
||||
"number": 2,
|
||||
"location": 41,
|
||||
"origin": 41,
|
||||
"name": "x",
|
||||
"named": true
|
||||
},
|
||||
{
|
||||
"number": 3,
|
||||
"location": 51,
|
||||
"origin": 61,
|
||||
"named": false
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
1
internal/sql/preprocess/testdata/mysql/narg_identifier/input.sql
vendored
Normal file
1
internal/sql/preprocess/testdata/mysql/narg_identifier/input.sql
vendored
Normal file
@@ -0,0 +1 @@
|
||||
SELECT * FROM users WHERE name = sqlc.narg(name);
|
||||
1
internal/sql/preprocess/testdata/mysql/narg_identifier/output.sql
vendored
Normal file
1
internal/sql/preprocess/testdata/mysql/narg_identifier/output.sql
vendored
Normal file
@@ -0,0 +1 @@
|
||||
SELECT * FROM users WHERE name = ?;
|
||||
17
internal/sql/preprocess/testdata/mysql/narg_identifier/side_table.json
vendored
Normal file
17
internal/sql/preprocess/testdata/mysql/narg_identifier/side_table.json
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
[
|
||||
{
|
||||
"start": 0,
|
||||
"end": 35,
|
||||
"dollar": true,
|
||||
"params": [
|
||||
{
|
||||
"number": 1,
|
||||
"location": 33,
|
||||
"origin": 33,
|
||||
"name": "name",
|
||||
"named": true,
|
||||
"nullable": true
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
2
internal/sql/preprocess/testdata/mysql/on_duplicate_key_update/input.sql
vendored
Normal file
2
internal/sql/preprocess/testdata/mysql/on_duplicate_key_update/input.sql
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
INSERT INTO t (a) VALUES (sqlc.arg(val))
|
||||
ON DUPLICATE KEY UPDATE a = sqlc.arg(new_val);
|
||||
2
internal/sql/preprocess/testdata/mysql/on_duplicate_key_update/output.sql
vendored
Normal file
2
internal/sql/preprocess/testdata/mysql/on_duplicate_key_update/output.sql
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
INSERT INTO t (a) VALUES (?)
|
||||
ON DUPLICATE KEY UPDATE a = ?;
|
||||
23
internal/sql/preprocess/testdata/mysql/on_duplicate_key_update/side_table.json
vendored
Normal file
23
internal/sql/preprocess/testdata/mysql/on_duplicate_key_update/side_table.json
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
[
|
||||
{
|
||||
"start": 0,
|
||||
"end": 59,
|
||||
"dollar": true,
|
||||
"params": [
|
||||
{
|
||||
"number": 1,
|
||||
"location": 26,
|
||||
"origin": 26,
|
||||
"name": "val",
|
||||
"named": true
|
||||
},
|
||||
{
|
||||
"number": 2,
|
||||
"location": 57,
|
||||
"origin": 69,
|
||||
"name": "new_val",
|
||||
"named": true
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
1
internal/sql/preprocess/testdata/mysql/skip_backslash_escape/input.sql
vendored
Normal file
1
internal/sql/preprocess/testdata/mysql/skip_backslash_escape/input.sql
vendored
Normal file
@@ -0,0 +1 @@
|
||||
SELECT 'a\' sqlc.arg(nope)';
|
||||
1
internal/sql/preprocess/testdata/mysql/skip_backslash_escape/output.sql
vendored
Normal file
1
internal/sql/preprocess/testdata/mysql/skip_backslash_escape/output.sql
vendored
Normal file
@@ -0,0 +1 @@
|
||||
SELECT 'a\' sqlc.arg(nope)';
|
||||
7
internal/sql/preprocess/testdata/mysql/skip_backslash_escape/side_table.json
vendored
Normal file
7
internal/sql/preprocess/testdata/mysql/skip_backslash_escape/side_table.json
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
[
|
||||
{
|
||||
"start": 0,
|
||||
"end": 28,
|
||||
"dollar": true
|
||||
}
|
||||
]
|
||||
1
internal/sql/preprocess/testdata/mysql/skip_backtick_identifier/input.sql
vendored
Normal file
1
internal/sql/preprocess/testdata/mysql/skip_backtick_identifier/input.sql
vendored
Normal file
@@ -0,0 +1 @@
|
||||
SELECT `sqlc.arg(nope)` FROM t;
|
||||
1
internal/sql/preprocess/testdata/mysql/skip_backtick_identifier/output.sql
vendored
Normal file
1
internal/sql/preprocess/testdata/mysql/skip_backtick_identifier/output.sql
vendored
Normal file
@@ -0,0 +1 @@
|
||||
SELECT `sqlc.arg(nope)` FROM t;
|
||||
7
internal/sql/preprocess/testdata/mysql/skip_backtick_identifier/side_table.json
vendored
Normal file
7
internal/sql/preprocess/testdata/mysql/skip_backtick_identifier/side_table.json
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
[
|
||||
{
|
||||
"start": 0,
|
||||
"end": 31,
|
||||
"dollar": true
|
||||
}
|
||||
]
|
||||
1
internal/sql/preprocess/testdata/mysql/skip_double_quoted_string/input.sql
vendored
Normal file
1
internal/sql/preprocess/testdata/mysql/skip_double_quoted_string/input.sql
vendored
Normal file
@@ -0,0 +1 @@
|
||||
SELECT "sqlc.arg(nope)" FROM t;
|
||||
1
internal/sql/preprocess/testdata/mysql/skip_double_quoted_string/output.sql
vendored
Normal file
1
internal/sql/preprocess/testdata/mysql/skip_double_quoted_string/output.sql
vendored
Normal file
@@ -0,0 +1 @@
|
||||
SELECT "sqlc.arg(nope)" FROM t;
|
||||
7
internal/sql/preprocess/testdata/mysql/skip_double_quoted_string/side_table.json
vendored
Normal file
7
internal/sql/preprocess/testdata/mysql/skip_double_quoted_string/side_table.json
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
[
|
||||
{
|
||||
"start": 0,
|
||||
"end": 31,
|
||||
"dollar": true
|
||||
}
|
||||
]
|
||||
2
internal/sql/preprocess/testdata/mysql/skip_hash_comment/input.sql
vendored
Normal file
2
internal/sql/preprocess/testdata/mysql/skip_hash_comment/input.sql
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
# sqlc.arg(nope)
|
||||
SELECT 1;
|
||||
2
internal/sql/preprocess/testdata/mysql/skip_hash_comment/output.sql
vendored
Normal file
2
internal/sql/preprocess/testdata/mysql/skip_hash_comment/output.sql
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
# sqlc.arg(nope)
|
||||
SELECT 1;
|
||||
7
internal/sql/preprocess/testdata/mysql/skip_hash_comment/side_table.json
vendored
Normal file
7
internal/sql/preprocess/testdata/mysql/skip_hash_comment/side_table.json
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
[
|
||||
{
|
||||
"start": 0,
|
||||
"end": 26,
|
||||
"dollar": true
|
||||
}
|
||||
]
|
||||
1
internal/sql/preprocess/testdata/mysql/slice/input.sql
vendored
Normal file
1
internal/sql/preprocess/testdata/mysql/slice/input.sql
vendored
Normal file
@@ -0,0 +1 @@
|
||||
SELECT id FROM users WHERE id IN (sqlc.slice(ids));
|
||||
1
internal/sql/preprocess/testdata/mysql/slice/output.sql
vendored
Normal file
1
internal/sql/preprocess/testdata/mysql/slice/output.sql
vendored
Normal file
@@ -0,0 +1 @@
|
||||
SELECT id FROM users WHERE id IN (/*SLICE:ids*/?);
|
||||
17
internal/sql/preprocess/testdata/mysql/slice/side_table.json
vendored
Normal file
17
internal/sql/preprocess/testdata/mysql/slice/side_table.json
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
[
|
||||
{
|
||||
"start": 0,
|
||||
"end": 50,
|
||||
"dollar": true,
|
||||
"params": [
|
||||
{
|
||||
"number": 1,
|
||||
"location": 47,
|
||||
"origin": 34,
|
||||
"name": "ids",
|
||||
"named": true,
|
||||
"slice": true
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
1
internal/sql/preprocess/testdata/mysql/slice_folds_identifier/input.sql
vendored
Normal file
1
internal/sql/preprocess/testdata/mysql/slice_folds_identifier/input.sql
vendored
Normal file
@@ -0,0 +1 @@
|
||||
SELECT * FROM foo WHERE retyped IN (sqlc.slice(paramName));
|
||||
1
internal/sql/preprocess/testdata/mysql/slice_folds_identifier/output.sql
vendored
Normal file
1
internal/sql/preprocess/testdata/mysql/slice_folds_identifier/output.sql
vendored
Normal file
@@ -0,0 +1 @@
|
||||
SELECT * FROM foo WHERE retyped IN (/*SLICE:paramname*/?);
|
||||
17
internal/sql/preprocess/testdata/mysql/slice_folds_identifier/side_table.json
vendored
Normal file
17
internal/sql/preprocess/testdata/mysql/slice_folds_identifier/side_table.json
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
[
|
||||
{
|
||||
"start": 0,
|
||||
"end": 58,
|
||||
"dollar": true,
|
||||
"params": [
|
||||
{
|
||||
"number": 1,
|
||||
"location": 55,
|
||||
"origin": 36,
|
||||
"name": "paramname",
|
||||
"named": true,
|
||||
"slice": true
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
1
internal/sql/preprocess/testdata/mysql/string_constant/input.sql
vendored
Normal file
1
internal/sql/preprocess/testdata/mysql/string_constant/input.sql
vendored
Normal file
@@ -0,0 +1 @@
|
||||
SELECT id FROM users WHERE a = sqlc.arg('x') AND b = sqlc.narg('y') AND c IN (sqlc.slice('ids'));
|
||||
1
internal/sql/preprocess/testdata/mysql/string_constant/output.sql
vendored
Normal file
1
internal/sql/preprocess/testdata/mysql/string_constant/output.sql
vendored
Normal file
@@ -0,0 +1 @@
|
||||
SELECT id FROM users WHERE a = ? AND b = ? AND c IN (/*SLICE:ids*/?);
|
||||
32
internal/sql/preprocess/testdata/mysql/string_constant/side_table.json
vendored
Normal file
32
internal/sql/preprocess/testdata/mysql/string_constant/side_table.json
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
[
|
||||
{
|
||||
"start": 0,
|
||||
"end": 69,
|
||||
"dollar": true,
|
||||
"params": [
|
||||
{
|
||||
"number": 1,
|
||||
"location": 31,
|
||||
"origin": 31,
|
||||
"name": "x",
|
||||
"named": true
|
||||
},
|
||||
{
|
||||
"number": 2,
|
||||
"location": 41,
|
||||
"origin": 53,
|
||||
"name": "y",
|
||||
"named": true,
|
||||
"nullable": true
|
||||
},
|
||||
{
|
||||
"number": 3,
|
||||
"location": 66,
|
||||
"origin": 78,
|
||||
"name": "ids",
|
||||
"named": true,
|
||||
"slice": true
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
1
internal/sql/preprocess/testdata/mysql/string_constant_keeps_case/input.sql
vendored
Normal file
1
internal/sql/preprocess/testdata/mysql/string_constant_keeps_case/input.sql
vendored
Normal file
@@ -0,0 +1 @@
|
||||
SELECT sqlc.arg('MixedCase'), sqlc.arg(MixedCase);
|
||||
1
internal/sql/preprocess/testdata/mysql/string_constant_keeps_case/output.sql
vendored
Normal file
1
internal/sql/preprocess/testdata/mysql/string_constant_keeps_case/output.sql
vendored
Normal file
@@ -0,0 +1 @@
|
||||
SELECT ?, ?;
|
||||
23
internal/sql/preprocess/testdata/mysql/string_constant_keeps_case/side_table.json
vendored
Normal file
23
internal/sql/preprocess/testdata/mysql/string_constant_keeps_case/side_table.json
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
[
|
||||
{
|
||||
"start": 0,
|
||||
"end": 12,
|
||||
"dollar": true,
|
||||
"params": [
|
||||
{
|
||||
"number": 1,
|
||||
"location": 7,
|
||||
"origin": 7,
|
||||
"name": "MixedCase",
|
||||
"named": true
|
||||
},
|
||||
{
|
||||
"number": 2,
|
||||
"location": 10,
|
||||
"origin": 30,
|
||||
"name": "mixedcase",
|
||||
"named": true
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
1
internal/sql/preprocess/testdata/mysql/user_variables_are_not_parameters/input.sql
vendored
Normal file
1
internal/sql/preprocess/testdata/mysql/user_variables_are_not_parameters/input.sql
vendored
Normal file
@@ -0,0 +1 @@
|
||||
SELECT @row := @row + 1 FROM users WHERE id = sqlc.arg(id);
|
||||
1
internal/sql/preprocess/testdata/mysql/user_variables_are_not_parameters/output.sql
vendored
Normal file
1
internal/sql/preprocess/testdata/mysql/user_variables_are_not_parameters/output.sql
vendored
Normal file
@@ -0,0 +1 @@
|
||||
SELECT @row := @row + 1 FROM users WHERE id = ?;
|
||||
16
internal/sql/preprocess/testdata/mysql/user_variables_are_not_parameters/side_table.json
vendored
Normal file
16
internal/sql/preprocess/testdata/mysql/user_variables_are_not_parameters/side_table.json
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
[
|
||||
{
|
||||
"start": 0,
|
||||
"end": 48,
|
||||
"dollar": true,
|
||||
"params": [
|
||||
{
|
||||
"number": 1,
|
||||
"location": 46,
|
||||
"origin": 46,
|
||||
"name": "id",
|
||||
"named": true
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
Reference in New Issue
Block a user