Skip to content

Commit 81eed41

Browse files
authored
refactor: convert some old queries to .txtcase (#137)
## What's Changed Consolidate some of the old test cases.
1 parent 20fe603 commit 81eed41

45 files changed

Lines changed: 415 additions & 300 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

adbc_drivers_validation/queries/type/bind/timestamp_ms.bind.json

Lines changed: 0 additions & 5 deletions
This file was deleted.

adbc_drivers_validation/queries/type/bind/timestamp_ms.bind.schema.json

Lines changed: 0 additions & 15 deletions
This file was deleted.

adbc_drivers_validation/queries/type/bind/timestamp_ms.bind.sql

Lines changed: 0 additions & 1 deletion
This file was deleted.

adbc_drivers_validation/queries/type/bind/timestamp_ms.json

Lines changed: 0 additions & 5 deletions
This file was deleted.

adbc_drivers_validation/queries/type/bind/timestamp_ms.schema.json

Lines changed: 0 additions & 10 deletions
This file was deleted.

adbc_drivers_validation/queries/type/bind/timestamp_ms.setup.sql

Lines changed: 0 additions & 4 deletions
This file was deleted.

adbc_drivers_validation/queries/type/bind/timestamp_ms.sql

Lines changed: 0 additions & 1 deletion
This file was deleted.

adbc_drivers_validation/queries/type/bind/timestamp_ms.toml

Lines changed: 0 additions & 19 deletions
This file was deleted.
Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
// Copyright (c) 2025 ADBC Drivers Contributors
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
15+
// part: metadata
16+
17+
[setup]
18+
drop = "test_timestamp"
19+
20+
[tags]
21+
sql-type-name = "TIMESTAMP"
22+
23+
// part: setup_query
24+
25+
CREATE TABLE test_timestamp (
26+
idx INT,
27+
res TIMESTAMP(3)
28+
);
29+
30+
// part: bind_query
31+
32+
INSERT INTO test_timestamp VALUES ($1, $2)
33+
34+
// part: bind_schema
35+
36+
{
37+
"format": "+s",
38+
"children": [
39+
{
40+
"name": "idx",
41+
"format": "i",
42+
"flags": []
43+
},
44+
{
45+
"name": "res",
46+
"format": "tsm:",
47+
"flags": ["nullable"]
48+
}
49+
]
50+
}
51+
52+
// part: bind
53+
54+
{"idx": 3, "res": 1684158330123}
55+
{"idx": 2, "res": 946684800123}
56+
{"idx": 1, "res": -62135596800000}
57+
{"idx": 4, "res": 253402300799999}
58+
{"idx": 0, "res": null}
59+
60+
// part: query
61+
62+
SELECT res FROM test_timestamp ORDER BY idx
63+
64+
// part: expected_schema
65+
66+
{
67+
"format": "+s",
68+
"children": [
69+
{
70+
"name": "res",
71+
"format": "tsm:",
72+
"flags": ["nullable"]
73+
}
74+
]
75+
}
76+
77+
// part: expected
78+
79+
{"res": null}
80+
{"res": -62135596800000}
81+
{"res": 946684800123}
82+
{"res": 1684158330123}
83+
{"res": 253402300799999}

adbc_drivers_validation/queries/type/bind/timestamp_ns.bind.json

Lines changed: 0 additions & 5 deletions
This file was deleted.

0 commit comments

Comments
 (0)