{"id":29151219,"url":"https://github.com/karpeleslab/psql","last_synced_at":"2025-07-01T00:08:56.553Z","repository":{"id":61628552,"uuid":"550201295","full_name":"KarpelesLab/psql","owner":"KarpelesLab","description":null,"archived":false,"fork":false,"pushed_at":"2025-03-14T07:49:29.000Z","size":203,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-01T00:08:52.928Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/KarpelesLab.png","metadata":{"files":{"readme":"README.md","changelog":"change.go","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-10-12T11:14:31.000Z","updated_at":"2025-03-14T07:49:33.000Z","dependencies_parsed_at":"2023-12-18T13:46:13.588Z","dependency_job_id":"56cf4e50-98d9-442c-aca3-c6c3e230bb4d","html_url":"https://github.com/KarpelesLab/psql","commit_stats":null,"previous_names":[],"tags_count":52,"template":false,"template_full_name":null,"purl":"pkg:github/KarpelesLab/psql","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KarpelesLab%2Fpsql","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KarpelesLab%2Fpsql/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KarpelesLab%2Fpsql/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KarpelesLab%2Fpsql/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/KarpelesLab","download_url":"https://codeload.github.com/KarpelesLab/psql/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KarpelesLab%2Fpsql/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262870877,"owners_count":23377314,"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":[],"created_at":"2025-07-01T00:08:54.914Z","updated_at":"2025-07-01T00:08:56.448Z","avatar_url":"https://github.com/KarpelesLab.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Go Reference](https://pkg.go.dev/badge/github.com/KarpelesLab/psql.svg)](https://pkg.go.dev/github.com/KarpelesLab/psql)\n\n# psql\n\nPlatform SQL code, including object load/save \u0026 query builder.\n\nThis works in some ways similar to `gorm` but with focus on supporting and using modern Go syntax \u0026 features.\n\n## Object binding\n\nAfter defining a structure, you can use it to load/save data from database.\n\n```go\ntype Table1 struct {\n    Key uint64 `sql:\",key=PRIMARY\"`\n    Name string `sql:\"Name,type=VARCHAR,size=64\"`\n}\n\n// ...\n\nobj, err := psql.Get[Table1](context.Background(), map[string]any{\"Key\": 42}) // this fetches entry with Key=42\n```\n\n## go 1.23\n\nNew go 1.23 iterators can be used\n\n```go\nres, err := psql.Iter[Table1](context.Background(), map[string]any{\"Type\": \"A\"}) // this fetches entries with Type=A\nif err != nil {\n    return err\n}\nfor v := range res {\n    // v is of type *Table1\n}\n```\n\n## Query builder\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkarpeleslab%2Fpsql","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkarpeleslab%2Fpsql","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkarpeleslab%2Fpsql/lists"}