Squeal是SQLite数据库的Swift接口,可以使用Swift创建和访问SQLite数据库。
创建表和索引:
Squeal提供Database.createTable(...)方法来创建SQLite数据库表:
database.createTable("people", definitions:[ "personId INTEGER PRIMARY KEY", "name TEXT", "email TEXT NOT NULL", "UNIQUE(email)", "CHECK (name IS NOT NULL OR email IS NOT NULL)" ])删除表和管理索引:
Database.renameTable(tableName
评论