{"id":3507213,"name":"github.com/Masterminds/structable","ecosystem":"go","description":"Structable makes a loose distinction between a Record (a description of the\ndata to be stored) and a Recorder (the thing that does the storing). A\nRecord is a simple annotated struct that describes the properties of an\nobject.\n\nStructable provides the Recorder (an interface usually backed by a *DbRecorder).\nThe Recorder is capable of doing the following:\n\nStructable is pragmatic in the sense that it allows ActiveRecord-like extension\nof the Record object to allow business logic. A Record does not *have* to be\na simple data-only struct. It can have methods -- even methods that operate\non the database.\n\nImportantly, Structable does not do any relation management. There is no\nmagic to convert structs, arrays, or maps to references to other tables.\n(If you want that, you may prefer GORM or GORP.) The preferred method of\nhandling relations is to attach additional methods to the Record struct.\n\nStructable uses Squirrel for statement building, and you may also use\nSquirrel for working with your data.\n\nThe following example is taken from the `example/users.go` file.\n\nThe above pattern closely binds the Recorder to the Record. Essentially, in\nthis usage Structable works like an ActiveRecord.\n\nIt is also possible to emulate a DAO-type model and use the Recorder as a data\naccess object and the Record as the data description object. An example of this\nmethod can be found in the `example/fence.go` code.\n\nThe `stbl` tag is of the form:\n\nThe field name is passed verbatim to the database. So `fieldName` will go to the database as `fieldName`.\nStructable is not at all opinionated about how you name your tables or fields. Some databases are, though, so\nyou may need to be careful about your own naming conventions.\n\n`PRIMARY_KEY` tells Structable that this field is (one of the pieces of) the primary key. Aliases: 'PRIMARY KEY'\n\n`AUTO_INCREMENT` tells Structable that this field is created by the database, and should never\nbe assigned during an Insert(). Aliases: SERIAL, AUTO INCREMENT\n\nThings Structable doesn't do (by design)\n\nHowever, Squirrel can ease many of these tasks.","homepage":"https://github.com/Masterminds/structable","licenses":"MIT","normalized_licenses":["MIT"],"repository_url":"https://github.com/Masterminds/structable","keywords_array":[],"namespace":"github.com/Masterminds","versions_count":1,"first_release_published_at":"2017-04-07T15:20:04.000Z","latest_release_published_at":"2017-04-07T15:20:04.000Z","latest_release_number":"v0.0.0-20170407152004-a1a302ef78ec","last_synced_at":"2026-04-13T13:31:11.230Z","created_at":"2022-04-10T20:46:15.189Z","updated_at":"2026-04-13T13:31:11.230Z","registry_url":"https://pkg.go.dev/github.com/Masterminds/structable","install_command":"go get github.com/Masterminds/structable","documentation_url":"https://pkg.go.dev/github.com/Masterminds/structable#section-documentation","metadata":{},"repo_metadata":{"uuid":"17090116","full_name":"Masterminds/structable","owner":"Masterminds","description":"Golang struct-to-table database mapper","archived":false,"fork":false,"pushed_at":"2020-08-16T11:46:15.000Z","size":92,"stargazers_count":271,"open_issues_count":5,"forks_count":28,"subscribers_count":12,"default_branch":"master","last_synced_at":"2023-03-13T08:10:23.151Z","etag":null,"topics":["go","squirrel"],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"logo_url":null,"metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-02-22T17:34:52.000Z","updated_at":"2023-02-22T18:54:22.000Z","dependencies_parsed_at":"2022-08-28T17:02:15.915Z","dependency_job_id":null,"html_url":"https://github.com/Masterminds/structable","commit_stats":null,"repository_url":"http://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Masterminds%2Fstructable","tags_url":"http://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Masterminds%2Fstructable/tags","manifests_url":"http://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Masterminds%2Fstructable/manifests","owner_url":"http://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Masterminds","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":108921946,"host_url":"http://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"http://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"http://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names"}},"repo_metadata_updated_at":"2023-03-21T18:40:17.834Z","dependent_packages_count":3,"downloads":null,"downloads_period":null,"dependent_repos_count":3,"rankings":{"downloads":null,"dependent_repos_count":2.9319377043188695,"dependent_packages_count":3.3235192592743,"stargazers_count":3.2095067920160814,"forks_count":4.298196252739952,"docker_downloads_count":null,"average":3.440790002087301},"purl":"pkg:golang/github.com/%21masterminds/structable","advisories":[],"docker_usage_url":"https://docker.ecosyste.ms/usage/go/github.com/Masterminds/structable","docker_dependents_count":null,"docker_downloads_count":null,"usage_url":"https://repos.ecosyste.ms/usage/go/github.com/Masterminds/structable","dependent_repositories_url":"https://repos.ecosyste.ms/api/v1/usage/go/github.com/Masterminds/structable/dependencies","status":null,"funding_links":[],"critical":null,"issue_metadata":{"last_synced_at":"2023-05-30T03:56:24.358Z","issues_count":4,"pull_requests_count":10,"avg_time_to_close_issue":155920156.0,"avg_time_to_close_pull_request":19814581.5,"issues_closed_count":1,"pull_requests_closed_count":8,"pull_request_authors_count":7,"issue_authors_count":4,"avg_comments_per_issue":0.5,"avg_comments_per_pull_request":0.9,"merged_pull_requests_count":6,"bot_issues_count":0,"bot_pull_requests_count":0,"past_year_issues_count":0,"past_year_pull_requests_count":0,"past_year_avg_time_to_close_issue":null,"past_year_avg_time_to_close_pull_request":null,"past_year_issues_closed_count":0,"past_year_pull_requests_closed_count":0,"past_year_pull_request_authors_count":0,"past_year_issue_authors_count":0,"past_year_avg_comments_per_issue":null,"past_year_avg_comments_per_pull_request":null,"past_year_bot_issues_count":0,"past_year_bot_pull_requests_count":0,"past_year_merged_pull_requests_count":0},"versions_url":"https://packages.ecosyste.ms/api/v1/registries/proxy.golang.org/packages/github.com%2FMasterminds%2Fstructable/versions","version_numbers_url":"https://packages.ecosyste.ms/api/v1/registries/proxy.golang.org/packages/github.com%2FMasterminds%2Fstructable/version_numbers","dependent_packages_url":"https://packages.ecosyste.ms/api/v1/registries/proxy.golang.org/packages/github.com%2FMasterminds%2Fstructable/dependent_packages","related_packages_url":"https://packages.ecosyste.ms/api/v1/registries/proxy.golang.org/packages/github.com%2FMasterminds%2Fstructable/related_packages","codemeta_url":"https://packages.ecosyste.ms/api/v1/registries/proxy.golang.org/packages/github.com%2FMasterminds%2Fstructable/codemeta","maintainers":[]}