{"id":21495345,"url":"https://github.com/go-courier/sqlx","last_synced_at":"2025-07-15T19:31:57.558Z","repository":{"id":33066496,"uuid":"145688949","full_name":"go-courier/sqlx","owner":"go-courier","description":null,"archived":false,"fork":false,"pushed_at":"2023-07-18T11:48:04.000Z","size":452,"stargazers_count":4,"open_issues_count":13,"forks_count":4,"subscribers_count":2,"default_branch":"v2","last_synced_at":"2024-11-17T12:45:40.881Z","etag":null,"topics":["mysql","sql"],"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/go-courier.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2018-08-22T09:45:54.000Z","updated_at":"2021-12-16T02:38:26.000Z","dependencies_parsed_at":"2024-06-19T04:10:43.940Z","dependency_job_id":"e09fe605-0a45-4291-8f0e-e98ddebeb431","html_url":"https://github.com/go-courier/sqlx","commit_stats":null,"previous_names":[],"tags_count":72,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/go-courier%2Fsqlx","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/go-courier%2Fsqlx/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/go-courier%2Fsqlx/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/go-courier%2Fsqlx/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/go-courier","download_url":"https://codeload.github.com/go-courier/sqlx/tar.gz/refs/heads/v2","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":226064569,"owners_count":17568035,"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":["mysql","sql"],"created_at":"2024-11-23T16:10:28.438Z","updated_at":"2024-11-23T16:10:29.133Z","avatar_url":"https://github.com/go-courier.png","language":"Go","readme":"## Sqlx\n\n[![GoDoc Widget](https://godoc.org/github.com/go-courier/sqlx/v2?status.svg)](https://godoc.org/github.com/go-courier/sqlx/v2)\n[![codecov](https://codecov.io/gh/go-courier/sqlx/branch/master/graph/badge.svg)](https://codecov.io/gh/go-courier/sqlx)\n[![Go Report Card](https://goreportcard.com/badge/github.com/go-courier/sqlx/v2)](https://goreportcard.com/report/github.com/go-courier/sqlx/v2)\n\n\nSql helpers just for mysql(5.7+)/postgres(10+) and mysql/postgres-compatibility db.\n\n\n```go\n// @def primary ID\n// @def index I_nickname/BTREE Nickname\n// @def index I_username Username\n// @def index I_geom/SPATIAL Geom\n// @def unique_index I_name Name\ntype User struct {\n\tID uint64 `db:\"f_id,autoincrement\"`\n\t// 姓名\n\tNameNeedToDrop   string                   `db:\"f_name_need_to_drop,deprecated\"`\n\tOldName   string                          `db:\"f_old_name,deprecated=f_name\"`\n\tName      string                          `db:\"f_name,default=''\"`\n\tUsername  string                          `db:\"f_username,default=''\"`\n\tNickname  string                          `db:\"f_nickname,default=''\"`\n\tGender    Gender                          `db:\"f_gender,default='0'\"`\n\tBoolean   bool                            `db:\"f_boolean,default=false\"`\n\tGeom      GeomString                      `db:\"f_geom\"`\n\tCreatedAt datatypes.Timestamp             `db:\"f_created_at,default='0'\"`\n\tUpdatedAt datatypes.Timestamp             `db:\"f_updated_at,default='0'\"`\n\tEnabled   datatypes.Bool                  `db:\"f_enabled,default='0'\"`\n}\n\ntype GeomString struct {\n\tV string\n}\n\nfunc (g GeomString) Value() (driver.Value, error) {\n\treturn g.V, nil\n}\n\nfunc (g *GeomString) Scan(src interface{}) error {\n\treturn nil\n}\n\nfunc (GeomString) DataType(driverName string) string {\n\tif driverName == \"mysql\" {\n\t\treturn \"geometry\"\n\t}\n\treturn \"geometry(Point)\"\n}\n\nfunc (GeomString) ValueEx() string {\n\treturn \"ST_GeomFromText(?)\"\n}\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgo-courier%2Fsqlx","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgo-courier%2Fsqlx","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgo-courier%2Fsqlx/lists"}