Sitemap

Swift Dev SQLite LazyPack

Mar 30, 2021

Another option for local database.

First of all, the github data for installing.

// https://github.com/stephencelis/SQLite.swift

// Copyright © 2014–2015 Stephen Celis.

and Demo Project from YouTuber Kilo-Loco.

// https://github.com/Kilo-Loco/SQLite

Second,

import -> make a var typing with “Connection!” (like picture)

var database: Connection!

Notice: that var is the pivot for the access.

Press enter or click to view image in full size

Third,

make a table “name” and your columns.

Press enter or click to view image in full size

Fourth,

loading the data.

Press enter or click to view image in full size

Fifth,

INSERT, UPDATE, DELETE the data.

Press enter or click to view image in full size
INSERT
Press enter or click to view image in full size
UPDATE
Press enter or click to view image in full size
DELETE

Sixth,

make data show in the UI.

Press enter or click to view image in full size
put your database data [Row] into listData
Press enter or click to view image in full size
set to your UI

Finally, check the Log and Screen.

Press enter or click to view image in full size
Press enter or click to view image in full size

See you.

--

--

Mario tsai
Mario tsai

Written by Mario tsai

Major in physical education. Football referee. And high interest in looking the world through the numbers.

No responses yet