Sqlite

main

Simple sqlite3 wrapper.
binaryscraping/swift-sqlite

swift-sqlite

The simplest SQLite wrapper for Swift possible.

Usage

let sqlite = try Sqlite(path: "/path/to/db.sqlite")

try sqlite.execute(
  """
      CREATE TABLE IF NOT EXISTS "tasks" (
        "id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL UNIQUE,
        "inserted_at" TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
        "description" TEXT NOT NULL,
        "is_complete" BOOLEAN NOT NULL DEFAULT FALSE
      );
  """)
  
try sqlite.run(
  """
      INSERT INTO "tasks" (
          "description"
      ) VALUES (
          ?
      )
  """,
  .text("Write tests for swift-sqlite library.")
)

Description

  • Swift Tools 5.3.0
View More Packages from this Author

Dependencies

  • None
Last updated: Sun Oct 20 2024 22:17:06 GMT-0900 (Hawaii-Aleutian Daylight Time)