{"id":19782452,"url":"https://github.com/steadylearner/go-sqlite-example","last_synced_at":"2025-02-28T06:44:11.784Z","repository":{"id":42914677,"uuid":"249168300","full_name":"steadylearner/go-SQLite-example","owner":"steadylearner","description":"Golang CLI example with SQLite.","archived":false,"fork":false,"pushed_at":"2022-03-26T08:54:55.000Z","size":66,"stargazers_count":1,"open_issues_count":3,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-11T02:32:57.364Z","etag":null,"topics":["go","go-cli","go-cli-demo","go-cli-example","golang","golang-database","sqlite","steadylearner"],"latest_commit_sha":null,"homepage":"https://www.steadylearner.com/blog","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/steadylearner.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-03-22T11:23:47.000Z","updated_at":"2023-04-20T17:02:52.000Z","dependencies_parsed_at":"2022-08-21T18:40:33.531Z","dependency_job_id":null,"html_url":"https://github.com/steadylearner/go-SQLite-example","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/steadylearner%2Fgo-SQLite-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/steadylearner%2Fgo-SQLite-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/steadylearner%2Fgo-SQLite-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/steadylearner%2Fgo-SQLite-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/steadylearner","download_url":"https://codeload.github.com/steadylearner/go-SQLite-example/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241113325,"owners_count":19911864,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["go","go-cli","go-cli-demo","go-cli-example","golang","golang-database","sqlite","steadylearner"],"created_at":"2024-11-12T06:05:11.156Z","updated_at":"2025-02-28T06:44:11.745Z","avatar_url":"https://github.com/steadylearner.png","language":"Go","readme":"# Test SQLite with Go\n\nUse this CLI example to learn how to use Golang with SQLite. Modify and reuse some parts of this to make a web app etc.\n\n## How to prepare the project before you test it\n\nFirst, help the models packages ready to work with main package.\n\n```console\n$mv models \u0026\u0026 go build\n```\n\n## How to setup SQLite database\n\nYou can manually handle SQLite database. [Refer to the documenation for the SQLite CLI.](https://sqlite.org/cli.html)\n\n```console\n$touch users.db \u0026\u0026 sqlite3 users.db\n$CREATE TABLE IF NOT EXISTS users (id INTEGER PRIMARY KEY AUTOINCREMENT, username TEXT NOT NULL UNIQUE)\n```\n\nYou can also uncomment the code similar to this in main.go\n\n```console\ndb.Exec(\"CREATE TABLE IF NOT EXISTS users (id INTEGER PRIMARY KEY AUTOINCREMENT, username TEXT NOT NULL UNIQUE)\")\n```\n\n## How to test it\n\nUse one of commands below to test CRULD(Create, Read, Update, List, Delete) users.\n\n```console\n$go run main.go -action=create\n$go run main.go -action=get\n$go run main.go -action=update\n$go run main.go -action=list\n$go run main.go -action=delete\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsteadylearner%2Fgo-sqlite-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsteadylearner%2Fgo-sqlite-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsteadylearner%2Fgo-sqlite-example/lists"}