added 2026-10-31 17:11:01

This commit is contained in:
patk
2026-10-31 17:17:02 -05:00
parent 286fe3d4d9
commit 3256a3d94e
2 changed files with 48 additions and 0 deletions
+1
View File
@@ -5,3 +5,4 @@
- [Gitea Create Repo API: Curl POST](/gitea-create-repo-api-curl-post.md) - [Gitea Create Repo API: Curl POST](/gitea-create-repo-api-curl-post.md)
- [Mount LUKS drive to Windows Subsystem for Linux Bare](/mount-luks-drive-to-windwos-subsystem-for-linux-bare.md) - [Mount LUKS drive to Windows Subsystem for Linux Bare](/mount-luks-drive-to-windwos-subsystem-for-linux-bare.md)
- [GOHUGO PWA SETUP](/gohugo-pwa-setup.md) - [GOHUGO PWA SETUP](/gohugo-pwa-setup.md)
- [sqlite3 guide](/sqlite3-guide.md)
+47
View File
@@ -0,0 +1,47 @@
# sqlite3 Guide
## Create Table
``` sql
CREATE TABLE IF NOT EXISTS config (
id INTEGER PRIMARY KEY AUTOINCREMENT,
user TEXT NOT NULL UNIQUE,
hashed_password TEXT NOT NULL
);
```
## Add Record to Table
``` sql
INSERT INTO config (user, hashed_password) VALUES ('abc', 'base64 hashed password');
```
## Update Record
``` sql
UPDATE config SET user = 'def' WHERE user = 'abc';
```
## Get All Records from Table
``` sql
SELECT * FROM config;
```
## Get Specific Record Field based on User
``` sql
SELECT hashed_password FROM config WHERE user = 'abc';
```
## Delete Record
``` sql
DELETE FROM config WHERE user = 'abc';
```
## View All Tables
``` sql
.tables
```