1
0
Fork 0

Adding upstream version 25.32.0.

Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
Daniel Baumann 2025-02-13 21:57:29 +01:00
parent ec2e441f55
commit 24751d63a1
Signed by: daniel
GPG key ID: FBB4F0E80A80222F
74 changed files with 2284 additions and 1814 deletions

View file

@ -379,10 +379,6 @@ class TestDuckDB(Validator):
"JSON_EXTRACT_PATH_TEXT(x, '$.family')",
"x ->> '$.family'",
)
self.validate_identity(
"ATTACH DATABASE ':memory:' AS new_database", check_command_warning=True
)
self.validate_identity("DETACH DATABASE new_database", check_command_warning=True)
self.validate_identity(
"SELECT {'yes': 'duck', 'maybe': 'goose', 'huh': NULL, 'no': 'heron'}"
)
@ -1392,3 +1388,20 @@ class TestDuckDB(Validator):
else:
self.assertEqual(ignore_null.sql("duckdb"), func.sql("duckdb"))
self.assertNotIn("IGNORE NULLS", windowed_ignore_null.sql("duckdb"))
def test_attach_detach(self):
# ATTACH
self.validate_identity("ATTACH 'file.db'")
self.validate_identity("ATTACH ':memory:' AS db_alias")
self.validate_identity("ATTACH IF NOT EXISTS 'file.db' AS db_alias")
self.validate_identity("ATTACH 'file.db' AS db_alias (READ_ONLY)")
self.validate_identity("ATTACH 'file.db' (READ_ONLY FALSE, TYPE sqlite)")
self.validate_identity("ATTACH 'file.db' (TYPE POSTGRES, SCHEMA 'public')")
self.validate_identity("ATTACH DATABASE 'file.db'", "ATTACH 'file.db'")
# DETACH
self.validate_identity("DETACH new_database")
self.validate_identity("DETACH IF EXISTS file")
self.validate_identity("DETACH DATABASE db", "DETACH db")