mirror of
https://github.com/groue/GRDB.swift
synced 2026-11-30 04:28:44 +00:00
Pass test for Database.tableExists() and temporary table
This commit is contained in:
1 parent
0620fc9f17
commit
8a89be6999
2 files changed
+8
-1
No files matched your search
@@ -1,6 +1,13 @@
|
||||
Release Notes
|
||||
=============
|
||||
|
||||
## Next Version
|
||||
|
||||
**Fixed**
|
||||
|
||||
- `Database.tableExists()` learned about temporary tables
|
||||
|
||||
|
||||
## 0.79.4
|
||||
|
||||
Released August 17, 2016
|
||||
|
||||
@@ -795,7 +795,7 @@ extension Database {
|
||||
|
||||
// SQlite identifiers are case-insensitive, case-preserving (http://www.alberton.info/dbms_identifiers_and_case_sensitivity.html)
|
||||
return Row.fetchOne(self,
|
||||
"SELECT sql FROM sqlite_master WHERE type = 'table' AND LOWER(name) = ?",
|
||||
"SELECT * FROM (SELECT sql, type, name FROM sqlite_master UNION SELECT sql, type, name FROM sqlite_temp_master) WHERE type = 'table' AND LOWER(name) = ?",
|
||||
arguments: [tableName.lowercaseString]) != nil
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user