A better ORM for Go, based on non-empty interfaces and code generation.

Related tags

ORM go golang sql orm sql-orm
Overview

reform

Release PkgGoDev CI AppVeyor Build status Coverage Report Go Report Card

Reform gopher logo

A better ORM for Go and database/sql.

It uses non-empty interfaces, code generation (go generate), and initialization-time reflection as opposed to interface{}, type system sidestepping, and runtime reflection. It will be kept simple.

Supported SQL dialects:

RDBMS Library and drivers Status
PostgreSQL github.com/lib/pq (postgres) Stable. Tested with all supported versions.
github.com/jackc/pgx/stdlib (pgx v3) Stable. Tested with all supported versions.
MySQL github.com/go-sql-driver/mysql (mysql) Stable. Tested with all supported versions.
SQLite3 github.com/mattn/go-sqlite3 (sqlite3) Stable.
Microsoft SQL Server github.com/denisenkom/go-mssqldb (sqlserver, mssql) Stable.
Tested on Windows with: SQL2008R2SP2, SQL2012SP1, SQL2014, SQL2016.
On Linux with: mcr.microsoft.com/mssql/server:2017-latest and mcr.microsoft.com/mssql/server:2019-latest Docker images.

Notes:

Quickstart

  1. Make sure you are using Go 1.14+, and Go modules support is enabled. Install or update reform package, reform and reform-db commands with:

    go get -v gopkg.in/reform.v1/...
    

    If you are not using Go modules yet, you can use dep to vendor desired version of reform, and then install commands with:

    go install -v ./vendor/gopkg.in/reform.v1/...
    

    You can also install the latest stable version of reform without using Go modules thanks to gopkg.in redirection, but please note that this will not use the stable versions of the database drivers:

    env GO111MODULE=off go get -u -v gopkg.in/reform.v1/...
    

    Canonical import path is gopkg.in/reform.v1; using github.com/go-reform/reform will not work.

    See note about versioning and branches below.

  2. Use reform-db command to generate models for your existing database schema. For example:

    reform-db -db-driver=sqlite3 -db-source=example.sqlite3 init
    
  3. Update generated models or write your own – struct representing a table or view row. For example, store this in file person.go:

    //go:generate reform
    
    //reform:people
    type Person struct {
    	ID        int32      `reform:"id,pk"`
    	Name      string     `reform:"name"`
    	Email     *string    `reform:"email"`
    	CreatedAt time.Time  `reform:"created_at"`
    	UpdatedAt *time.Time `reform:"updated_at"`
    }

    Magic comment //reform:people links this model to people table or view in SQL database. The first value in field's reform tag is a column name. pk marks primary key. Use value - or omit tag completely to skip a field. Use pointers (recommended) or sql.NullXXX types for nullable fields.

  4. Run reform [package or directory] or go generate [package or file]. This will create person_reform.go in the same package with type PersonTable and methods on Person.

  5. See documentation how to use it. Simple example:

    // Get *sql.DB as usual. PostgreSQL example:
    sqlDB, err := sql.Open("postgres", "postgres://127.0.0.1:5432/database")
    if err != nil {
    	log.Fatal(err)
    }
    defer sqlDB.Close()
    
    // Use new *log.Logger for logging.
    logger := log.New(os.Stderr, "SQL: ", log.Flags())
    
    // Create *reform.DB instance with simple logger.
    // Any Printf-like function (fmt.Printf, log.Printf, testing.T.Logf, etc) can be used with NewPrintfLogger.
    // Change dialect for other databases.
    db := reform.NewDB(sqlDB, postgresql.Dialect, reform.NewPrintfLogger(logger.Printf))
    
    // Save record (performs INSERT or UPDATE).
    person := &Person{
    	Name:  "Alexey Palazhchenko",
    	Email: pointer.ToString("[email protected]"),
    }
    if err := db.Save(person); err != nil {
    	log.Fatal(err)
    }
    
    // ID is filled by Save.
    person2, err := db.FindByPrimaryKeyFrom(PersonTable, person.ID)
    if err != nil {
    	log.Fatal(err)
    }
    fmt.Println(person2.(*Person).Name)
    
    // Delete record.
    if err = db.Delete(person); err != nil {
    	log.Fatal(err)
    }
    
    // Find records by IDs.
    persons, err := db.FindAllFrom(PersonTable, "id", 1, 2)
    if err != nil {
    	log.Fatal(err)
    }
    for _, p := range persons {
    	fmt.Println(p)
    }

Background

reform was born during summer 2014 out of frustrations with existing Go ORMs. All of them have a method Save(record interface{}) which can be used like this:

orm.Save(User{Name: "gopher"})
orm.Save(&User{Name: "gopher"})
orm.Save(nil)
orm.Save("Batman!!")

Now you can say that last invocation is obviously invalid, and that it's not hard to make an ORM to accept both first and second versions. But there are two problems:

  1. Compiler can't check it. Method's signature in godoc will not tell us how to use it. We are essentially working against those tools by sidestepping type system.
  2. First version is still invalid, since one would expect Save() method to set record's primary key after INSERT, but this change will be lost due to passing by value.

First proprietary version of reform was used in production even before go generate announcement. This free and open-source version is the fourth milestone on the road to better and idiomatic API.

Versioning and branching policy

We are following Semantic Versioning, using gopkg.in and filling a changelog. All v1 releases are SemVer-compatible; breaking changes will not be applied.

We use tags v1.M.m for releases, branch main (default on GitHub) for the next minor release development, and release/1.M branches for patch release development. (It was more complicated before 1.4.0 release.)

Major version 2 is currently not planned.

Additional packages

Caveats and limitations

  • There should be zero pk fields for Struct and exactly one pk field for Record. Composite primary keys are not supported (#114).
  • pk field can't be a pointer (== nil doesn't work).
  • Database row can't have a Go's zero value (0, empty string, etc.) in primary key column.

License

Code is covered by standard MIT-style license. Copyright (c) 2016-2020 Alexey Palazhchenko. See LICENSE for details. Note that generated code is covered by the terms of your choice.

The reform gopher was drawn by Natalya Glebova. Please use it only as reform logo. It is based on the original design by Renée French, released under Creative Commons Attribution 3.0 USA license.

Contributing

See Contributing Guidelines.

Issues
  • `reform-db init` should not stop on errors

    `reform-db init` should not stop on errors

    This is kind of feature request or propose. It would be nice if reform would have exclude flag in command line, for example i have tables for another app which have composite primary key, and they're not needed in my Go application at all.

    feature help-wanted 
    opened by ghost 12
  • reform-db: gofmt error: exit status 2

    reform-db: gofmt error: exit status 2

    Hello! I'm really new to golang, i wish i can provide more info but this is all i have now. Running reform-db -db-driver=postgres -db-source=postgres://user:[email protected]:port/database init returns reform-db: gofmt error: exit status 2, even if it's simple 2 tables "just for test" database. I'm using:

    1. PostgreSQL 10.5
    2. Ubuntu Server 18.04
    3. Go 1.11
    4. installed reform by go get -u gopkg.in/reform.v1/... so I assume I'm using v1.3.2 For now i don't know what to do, I'm deadlined so i have to choose between other options like kallax or pg, but I really like the simplicity and ideology of reform, so I hope this will be fixed.
    question 
    opened by ghost 10
  • Logo

    Logo

    We need a unique logo. With a gopher. Some possible symbols:

    • something database-related: UML database symbols, etc.
    • something about reform: gopher on tribune?

    @bosenok wanted to help.

    feature help-wanted 
    opened by AlekSi 9
  • selecting only specified columns?

    selecting only specified columns?

    Hi, thanks for writing reform.

    I'd like to know if it's currently possible to return only a subset of columns, e.g.:

    SELECT id, name, email FROM users
    

    ... and get back a slice of records with only those particular fields (id, name, email) pulled from the database. I just started with reform, so perhaps I missed it, but I don't see how to do this.

    Perhaps this issue is referring to that functionality?

    Related, what is the best way to get a count of results (without actually reading rows)? My use case is to find out if a row meeting a particular constraint exists (e.g. is there already a user with this email?)

    I already have code for accomplishing both of these using database/sql, but if there is an idiomatic way of doing this with reform that would be handy.

    Thanks

    question 
    opened by armhold 8
  • MS SQL

    MS SQL

    Work in progress.

    • ~~Build fails due to reasons discused in #11~~
    • ~~A temporary hack is used to mask LIMIT 1 incompatibility (querier_selects.go)~~
    • ~~Prabably there are problems with datetime columns, not sure~~
    opened by AlekseyMartynov 7
  • Blacklist and Whitelist functionality for Update and Insert

    Blacklist and Whitelist functionality for Update and Insert

    What I want for Insert or Update is to take default values from database if it's possible.

    db.Update(obj, WithBlacklist("id", "created"))
    db.Insert(obj, WithWhitelist("name", "surname"))
    
    feature 
    opened by m0sth8 7
  • Multi insert

    Multi insert

    I think it's a good idea for orm have a method for Insert array struct?

    example

    DB.Insert(s []Struct)
    
    // SQL
    INSERT INTO `table name` (`col1`, `col2`, `col3`) VALUES (s1.col1, s1.col2, s1.col3), (...)
    

    If need, i can write It

    feature 
    opened by eaglemoor 7
  • Support for MS SQL

    Support for MS SQL

    3 steps:

    1. Add dialect for MS SQL. That should be easy.
    2. Fix reform and/or tests. Should be easy too, and likely not even required.
    3. The hardest step: add Travis CI integration. MS SQL should be provisioned only on builder with specified target.

    The first one who will send a working pull request will receive a squishable gopher from me and @GolangShow!

    feature help-wanted 
    opened by AlekSi 7
  • Bump github.com/golangci/golangci-lint from 1.35.2 to 1.39.0 in /tools

    Bump github.com/golangci/golangci-lint from 1.35.2 to 1.39.0 in /tools

    Bumps github.com/golangci/golangci-lint from 1.35.2 to 1.39.0.

    Release notes

    Sourced from github.com/golangci/golangci-lint's releases.

    v1.39.0

    Changelog

    94d2d803 Add gomoddirectives linter. (#1817) b6a6faa9 Add new presets (#1847) 8db518ce Add versions, improve deprecation system, improve linters page (#1854) 4bc68c0a Bump gofumpt from v0.1.0 to v0.1.1 (#1834) 82778e2f Bump importas to HEAD (#1864) fb394a99 Bump makezero to HEAD (#1865) e381b330 Bump rowserrcheck to HEAD (#1843) 8d0075da Bump staticcheck to 2020.2.3 (v0.1.3) (#1829) 03992d04 Bump wrapcheck to v1.0.0 (#1863) fce3949d Deprecate 'scopelint' linter (#1819) 2e5e8874 Improve issue templates chooser. (#1821) 87d37c6c Restore fast linters meaning (#1844) 814bf0e0 Set version command output to Stdout (#1869) ba6e969f build(deps): bump github.com/go-critic/go-critic from 0.5.4 to 0.5.5 (#1867) e23f80ee build(deps): bump github.com/mgechev/revive from 1.0.3 to 1.0.5 (#1866) 714bd288 build(deps): bump github.com/securego/gosec/v2 from 2.6.1 to 2.7.0 (#1823) c11228b4 build(deps): bump github.com/shirou/gopsutil/v3 from 3.21.1 to 3.21.2 (#1822) cd2025d1 build(deps): bump github.com/sirupsen/logrus from 1.8.0 to 1.8.1 (#1845) 7a612da1 bump ifshort to v1.0.2 (#1837) 351f57b1 bump wastedassign to v0.2.0 (#1815) 809be026 fix: linters load mode (#1862) e1a734e5 nolintlint: allow to fix //nolint lines (#1583) cd6644d4 revive: the default configuration is only applied when no dedicated configuration. (#1831) 9aea4aee typecheck: display compilation errors as report instead of error (#1861)

    v1.38.0

    Changelog

    5698d46e Add ForceTypeAssert linter (#1789) 012559c5 Add linter wastedassign (#1651) 66fc7797 Add nilerr linter. (#1788) f00da2c0 Add stringintconv and ifaceassert to govet (#1360) a1e3749a Bump github.com/Djarvur/go-err113 to HEAD (#1760) 495a74f6 Bump github.com/timakin/bodyclose to HEAD (#1758) b7aac3b1 Bump wsl to v3.2.0 (#1750) 251b205f Deprecate Interfacer linter (#1755) 42ff682f Deprecate maligned, add govet fieldalignment as replacement (#1765) 92d38e52 Exclude PR about doc dependencies from release changelog. (#1752) 89315e00 Fix go-header usage (#1785) 05836e48 Integrate ImportAs linter (#1783) cdaf03d1 Remove outdated CVEs from .nancy-ignore (#1791) 856ffd16 Support RelatedInformation for analysis Diagnostic (#1773) 507703b4 Update Docs and Assets Github Actions (#1460) 5dcc3eaf Update dependencies that dependabot cannot (#1790) 2e7c389d Update staticcheck to v0.1.2 (2020.2.2) (#1756) b77118fd Use errcheck from main repo instead of golangci-lint fork (#1319) 1a906bc1 Use go v1.14 in go.mod file (#1803)

    ... (truncated)

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.

    Dependabot will merge this PR once it's up-to-date and CI passes on it, as requested by @AlekSi.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies go 
    opened by dependabot[bot] 6
  • Bump github.com/stretchr/testify from 1.6.1 to 1.7.0

    Bump github.com/stretchr/testify from 1.6.1 to 1.7.0

    Bumps github.com/stretchr/testify from 1.6.1 to 1.7.0.

    Release notes

    Sourced from github.com/stretchr/testify's releases.

    Minor improvements and bug fixes

    Minor feature improvements and bug fixes

    Commits
    • acba37e Only use repeatability if no repeatability left
    • eb8c41e Add more tests to mock package
    • a5830c5 Extract method to evaluate closest match
    • 1962448 Use Repeatability as tie-breaker for closest match
    • 92707c0 Fixed the link to not point to assert only
    • 05dd0b2 Updated the readme to point to pkg.dev
    • c26b7f3 Update assertions.go
    • 8fb4b24 [Fix] The most recent changes to golang/protobuf breaks the spew Circular dat...
    • dc8af72 add generated code for positive/negative assertion
    • 1544508 add assert positive/negative
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.

    Dependabot will merge this PR once it's up-to-date and CI passes on it, as requested by @AlekSi.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies go 
    opened by dependabot[bot] 6
  • Skip sqlite3 tables with incorrect table_info

    Skip sqlite3 tables with incorrect table_info

    I have a third party database that I cannot change it. Is there a way to silently fail and still generate the correct entities?

    reform-db: 2018/11/10 04:33:51.656895 cmd_init_sqlite3.go:85: no such module: spellfix1
    panic: no such module: spellfix1
    
    goroutine 1 [running]:
    gopkg.in/reform.v1/internal.(*Logger).Fatalf(0xc0000938f0, 0x45377d0, 0x2, 0xc000348a60, 0x1, 0x1)
    	/Users/mgonzalez/go/src/gopkg.in/reform.v1/internal/logger.go:51 +0x107
    main.initModelsSQLite3(0xc00009c8a0, 0xc0000dbbd0, 0x400b9bd, 0x44dd240)
    	/Users/mgonzalez/go/src/gopkg.in/reform.v1/reform-db/cmd_init_sqlite3.go:85 +0x469
    main.cmdInit(0xc00009c8a0, 0xc00001e004, 0x1f)
    	/Users/mgonzalez/go/src/gopkg.in/reform.v1/reform-db/cmd_init.go:184 +0xb2f
    main.main()
    	/Users/mgonzalez/go/src/gopkg.in/reform.v1/reform-db/main.go:128 +0x3a4
    

    Something like the following:

    https://stackoverflow.com/questions/38425835/reflecting-sqlite-database-with-spellfix1-tables

    Edit: Even better, something like --skip-tables I think would be less invasive?

    feature help-wanted 
    opened by eschizoid 6
  • Bump github.com/reviewdog/reviewdog from 0.13.1 to 0.14.1 in /tools

    Bump github.com/reviewdog/reviewdog from 0.13.1 to 0.14.1 in /tools

    Bumps github.com/reviewdog/reviewdog from 0.13.1 to 0.14.1.

    Release notes

    Sourced from github.com/reviewdog/reviewdog's releases.

    v0.14.1

    See CHANGELOG

    Changelog

    • 6d1874e Bump version to v0.14.1
    • 88b71f3 Fix the GitLab CI
    • 5959fa5 Fix typo - action-pylint runs pylint, not pyright
    • 6e7fdec Merge pull request #1101 from reviewdog/renovate/cloud.google.com-go-compute-1.x
    • 59f288b Merge pull request #1110 from reviewdog/renovate/npm-node-fetch-vulnerability
    • 639ecf0 Merge pull request #1113 from reviewdog/renovate/npm-ansi-regex-vulnerability
    • 031219b Merge pull request #1121 from reviewdog/renovate/github.com-xanzy-go-gitlab-0.x
    • bf68452 Merge pull request #1122 from reviewdog/renovate/cloud.google.com-go-compute-1.x
    • 0f9f52e Merge pull request #1123 from reviewdog/renovate/google-github-actions-setup-gcloud-0.x
    • 49470d6 Merge pull request #1125 from lgellrich/fix-1124
    • 35d9b1d Merge pull request #1126 from reviewdog/renovate/cloud.google.com-go-compute-1.x
    • 69aecf2 Merge pull request #1127 from reviewdog/renovate/golang.org-x-oauth2-digest
    • 513d399 Merge pull request #1128 from reviewdog/renovate/cloud.google.com-go-compute-1.x
    • cd41778 Merge pull request #1129 from reviewdog/renovate/actions-setup-go-3.x
    • 8091d33 Merge pull request #1130 from EPMatt/add-gh-action-shfmt
    • 05e5d57 Merge pull request #1131 from reviewdog/renovate/actions-checkout-3.x
    • 5fa0583 Merge pull request #1132 from reviewdog/renovate/github.com-xanzy-go-gitlab-0.x
    • bf90716 Merge pull request #1133 from EPMatt/add-gh-action-prettier-actionlint
    • a9f4b5e Merge pull request #1134 from reviewdog/renovate/golang-1.x
    • 1831696 Merge pull request #1135 from reviewdog/renovate/github.com-xanzy-go-gitlab-0.x
    • 73d2554 Merge pull request #1136 from reviewdog/renovate/github.com-reviewdog-errorformat-digest
    • 384edb9 Merge pull request #1137 from reviewdog/renovate/github.com-xanzy-go-gitlab-0.x
    • 213e23d Merge pull request #1138 from reviewdog/renovate/google-github-actions-setup-gcloud-0.x
    • 2feda38 Merge pull request #1139 from reviewdog/renovate/github.com-reviewdog-errorformat-digest
    • 509962f Merge pull request #1140 from reviewdog/renovate/github.com-reviewdog-errorformat-digest
    • c38d885 Merge pull request #1141 from reviewdog/renovate/golang.org-x-oauth2-digest
    • 67c3f23 Merge pull request #1142 from reviewdog/renovate/github.com-xanzy-go-gitlab-0.x
    • 5a89b33 Merge pull request #1143 from reviewdog/renovate/github.com-stretchr-testify-1.x
    • c021b87 Merge pull request #1144 from reviewdog/renovate/golang-1.x
    • 65df2da Merge pull request #1145 from reviewdog/renovate/github.com-xanzy-go-gitlab-0.x
    • f65118b Merge pull request #1146 from reviewdog/renovate/actions-cache-3.x
    • 39d06e9 Merge pull request #1148 from reviewdog/dependabot/npm_and_yarn/minimist-1.2.6
    • 9ddf6a5 Merge pull request #1153 from reviewdog/renovate/codecov-codecov-action-3.x
    • 9988f62 Merge pull request #1154 from jordemort/patch-2
    • c9cf930 Merge pull request #1155 from reviewdog/renovate/contrib.go.opencensus.io-exporter-stackdriver-0.x
    • 9437455 Merge pull request #1156 from reviewdog/renovate/golang.org-x-oauth2-digest
    • bca4e0b Merge pull request #1157 from reviewdog/renovate/golang-1.x
    • 075ec96 Merge pull request #1159 from reviewdog/renovate/cloud.google.com-go-compute-1.x
    • 0562aeb Merge pull request #1160 from reviewdog/fix-git
    • 01b106b Merge pull request #1161 from reviewdog/fix-gitlab-ci
    • e1791fc Merge pull request #1162 from reviewdog/renovate/contrib.go.opencensus.io-exporter-stackdriver-0.x
    • 2452508 Merge pull request #1163 from reviewdog/bump
    • 7c3eafb Remove needless git command dependency by GitRelWorkdir func
    • 208c9d5 Use +=
    • 86c591e add link to shfmt github action

    ... (truncated)

    Changelog

    Sourced from github.com/reviewdog/reviewdog's changelog.

    [v0.14.1] - 2022-04-21

    :rocket: Enhancements

    • #1160 Remove needless git command dependency by GitRelWorkdir func

    :bug: Fixes

    • #1125 Allow BITBUCKET_SERVER_URL to have subpath

    [v0.14.0] - 2022-02-11

    :rocket: Enhancements

    • #1118 Support end_lnum (%e) and end_col (%k) errorformat

    Commits
    • 2452508 Merge pull request #1163 from reviewdog/bump
    • 6d1874e Bump version to v0.14.1
    • 0562aeb Merge pull request #1160 from reviewdog/fix-git
    • 49470d6 Merge pull request #1125 from lgellrich/fix-1124
    • 8311cfe fix staticcheck warning
    • 5a89b33 Merge pull request #1143 from reviewdog/renovate/github.com-stretchr-testify-1.x
    • e1791fc Merge pull request #1162 from reviewdog/renovate/contrib.go.opencensus.io-exp...
    • 01b106b Merge pull request #1161 from reviewdog/fix-gitlab-ci
    • ec59de7 fix(deps): update module github.com/stretchr/testify to v1.7.1
    • 469dbee fix(deps): update module contrib.go.opencensus.io/exporter/stackdriver to v0....
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies go 
    opened by dependabot[bot] 1
  • Bump github.com/brianvoe/gofakeit/v6 from 6.14.3 to 6.16.0

    Bump github.com/brianvoe/gofakeit/v6 from 6.14.3 to 6.16.0

    Bumps github.com/brianvoe/gofakeit/v6 from 6.14.3 to 6.16.0.

    Commits
    • 8c32104 Finish v6.16.0
    • 3bd90aa sql - made additional updates to the sql database insert queries.
    • b4e5a0c json - added more tests to cover more json functions
    • 817f4e4 Merge pull request #201 from petergeorgas/feature/add_sql_queries
    • bdb3c41 Began attempting to test JSON unsuccessfully
    • 6f49ed4 Added test for autoincrement
    • 0aabdc1 Add autoincrement
    • e9aa388 Add function for Faker instance
    • c68f5c2 Began implementing SQL Insert query generation
    • e5f8d50 Finish v6.15.0
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies go 
    opened by dependabot[bot] 1
  • Bump github.com/lib/pq from 1.8.0 to 1.10.5

    Bump github.com/lib/pq from 1.8.0 to 1.10.5

    Bumps github.com/lib/pq from 1.8.0 to 1.10.5.

    Release notes

    Sourced from github.com/lib/pq's releases.

    v1.10.4

    • Keep track of (context cancelled) error on connection.
    • Fix android build

    v1.10.3

    • implement ConnPrepareContext/StmtQueryContext/StmtExecContext interfaces (context.Cancel() now ends connections)
    • Avoid type assertion to the same type
    • Fix build for illumos and solaris

    v1.10.2

    • fix TimeTZ with second offsets
    • fix GOOS compilation

    v1.10.1

    • fix concurrent map write

    v1.10.0

    • support inline SSL certs

    v1.9.0

    • better errors on network failures
    • fully implement database/sql/driver.Driver
    • improved query cancellation from contexts
    • support int32/float32/[]byte slices in Array
    Commits
    • 1ef134d Merge pull request #1074 from lib/fix-assertions
    • 4b55993 Avoid asserting on error message for cancel tests
    • 8446d16 issue 1062: Keep track of (context cancelled) error on connection, and make r...
    • 6a102c0 Merge pull request #1060 from ian4hu/patch-1
    • a54251e Merge pull request #1061 from mjl-/fix-flaky-TestConnPrepareContext
    • 2b4fa17 Fix flaky TestConnPrepareContext
    • b33a1b7 Fix android build
    • 16e9cad Fix build in android
    • 26399a7 Merge pull request #1057 from jfcg/master
    • 0870776 fix possible integer truncation
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies go 
    opened by dependabot[bot] 0
  • Bump actions/setup-go from 2 to 3

    Bump actions/setup-go from 2 to 3

    Bumps actions/setup-go from 2 to 3.

    Release notes

    Sourced from actions/setup-go's releases.

    v3.0.0

    What's Changed

    Breaking Changes

    With the update to Node 16, all scripts will now be run with Node 16 rather than Node 12.

    This new major release removes the stable input, so there is no need to specify additional input to use pre-release versions. This release also corrects the pre-release versions syntax to satisfy the SemVer notation (1.18.0-beta1 -> 1.18.0-beta.1, 1.18.0-rc1 -> 1.18.0-rc.1).

    steps:
      - uses: actions/[email protected]
      - uses: actions/[email protected]
        with:
          go-version: '1.18.0-rc.1' 
      - run: go version
    

    Add check-latest input

    In scope of this release we add the check-latest input. If check-latest is set to true, the action first checks if the cached version is the latest one. If the locally cached version is not the most up-to-date, a Go version will then be downloaded from go-versions repository. By default check-latest is set to false. Example of usage:

    steps:
      - uses: actions/[email protected]
      - uses: actions/[email protected]
        with:
          go-version: '1.16'
          check-latest: true
      - run: go version
    

    Moreover, we updated @actions/core from 1.2.6 to 1.6.0

    v2.1.5

    In scope of this release we updated matchers.json to improve the problem matcher pattern. For more information please refer to this pull request

    v2.1.4

    What's Changed

    New Contributors

    Full Changelog: https://github.com/actions/setup-go/compare/v2.1.3...v2.1.4

    v2.1.3

    • Updated communication with runner to use environment files rather then workflow commands

    v2.1.2

    This release includes vendored licenses for this action's npm dependencies.

    ... (truncated)

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies github_actions 
    opened by dependabot[bot] 1
  • Bump actions/cache from 2 to 3.0.1

    Bump actions/cache from 2 to 3.0.1

    Bumps actions/cache from 2 to 3.0.1.

    Release notes

    Sourced from actions/cache's releases.

    v3.0.1

    • Added support for caching from GHES 3.5.
    • Fixed download issue for files > 2GB during restore.

    v3.0.0

    • This change adds a minimum runner version(node12 -> node16), which can break users using an out-of-date/fork of the runner. This would be most commonly affecting users on GHES 3.3 or before, as those runners do not support node16 actions and they can use actions from github.com via github connect or manually copying the repo to their GHES instance.

    • Few dependencies and cache action usage examples have also been updated.

    v2.1.7

    Support 10GB cache upload using the latest version 1.0.8 of @actions/cache

    v2.1.6

    • Catch unhandled "bad file descriptor" errors that sometimes occurs when the cache server returns non-successful response (actions/cache#596)

    v2.1.5

    • Fix permissions error seen when extracting caches with GNU tar that were previously created using BSD tar (actions/cache#527)

    v2.1.4

    • Make caching more verbose #650
    • Use GNU tar on macOS if available #701

    v2.1.3

    • Upgrades @actions/core to v1.2.6 for CVE-2020-15228. This action was not using the affected methods.
    • Fix error handling in uploadChunk where 400-level errors were not being detected and handled correctly

    v2.1.2

    • Adds input to limit the chunk upload size, useful for self-hosted runners with slower upload speeds
    • No-op when executing on GHES

    v2.1.1

    • Update @actions/cache package to v1.0.2 which allows cache action to use posix format when taring files.

    v2.1.0

    • Replaces the http-client with the Azure Storage SDK for NodeJS when downloading cache content from Azure. This should help improve download performance and reliability as the SDK downloads files in 4 MB chunks, which can be parallelized and retried independently
    • Display download progress and speed
    Changelog

    Sourced from actions/cache's changelog.

    3.0.1

    • Added support for caching from GHES 3.5.
    • Fixed download issue for files > 2GB during restore.
    Commits
    • 136d96b Enabling actions/cache for GHES based on presence of AC service (#774)
    • 7d4f40b Bumping up the version to fix download issue for files > 2 GB. (#775)
    • 2d8d0d1 Updated what's new. (#771)
    • 7799d86 Updated the usage and docs to the major version release. (#770)
    • 4b0cf6c Merge pull request #769 from actions/users/ashwinsangem/bump_major_version
    • 60c606a Update licensed files
    • b6e9a91 Revert "Updated to the latest version."
    • c842503 Updated to the latest version.
    • 2b7da2a Bumped up to a major version.
    • deae296 Merge pull request #651 from magnetikonline/fix-golang-windows-example
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies github_actions 
    opened by dependabot[bot] 1
  • Bump github.com/golangci/golangci-lint from 1.43.0 to 1.45.2 in /tools

    Bump github.com/golangci/golangci-lint from 1.43.0 to 1.45.2 in /tools

    Bumps github.com/golangci/golangci-lint from 1.43.0 to 1.45.2.

    Release notes

    Sourced from github.com/golangci/golangci-lint's releases.

    v1.45.2

    Changelog

    • 8bdc4d3f fix: help command (#2681)

    v1.45.1

    Changelog

    • da0a6b3b build(deps): bump actions/cache from 2.1.7 to 3 (#2674)
    • e187dd8a build(deps): bump github.com/hashicorp/go-version from 1.2.1 to 1.4.0 (#2659)
    • ec8d6894 build(deps): bump github.com/stretchr/testify from 1.7.0 to 1.7.1 (#2660)
    • 243ec6f0 bump varnamelen to v0.6.1 (#2656)
    • 8f7f44d1 depguard: reduce requirements (#2672)
    • 7bbbe77e feat: automatic Go version detection (#2669)
    • f0554415 fix: disable structcheck with go1.18 (#2666)
    • 93feed1d fix: update base images (#2661)

    v1.45.0

    Changelog

    • ea1df6f1 Default to YAML when config file has no extension (#2618)
    • 93a0015c build(deps): bump actions/checkout from 2 to 3 (#2643)
    • 176ef3f7 build(deps): bump actions/setup-node from 2 to 3 (#2628)
    • adc0d8ec build(deps): bump github.com/ashanbrown/makezero from 1.1.0 to 1.1.1 (#2621)
    • 8f9bc4a7 build(deps): bump github.com/daixiang0/gci from 0.3.1 to 0.3.2 (#2640)
    • 6fc688ae build(deps): bump github.com/securego/gosec/v2 from 2.9.6 to 2.10.0 (#2624)
    • da08d2bd build(deps): bump github.com/shirou/gopsutil/v3 from 3.22.1 to 3.22.2 (#2641)
    • 873a27e7 build(deps): bump github.com/sivchari/containedctx from 1.0.1 to 1.0.2 (#2623)
    • ec952367 build(deps): bump github.com/spf13/cobra from 1.3.0 to 1.4.0 (#2646)
    • 0e7233eb build(deps): bump github.com/tomarrell/wrapcheck/v2 from 2.4.0 to 2.5.0 (#2603)
    • 0bcc0a3b build(deps): bump golangci/golangci-lint-action from 2.5.2 to 3.1.0 (#2627)
    • 5ffadacb build(deps): bump mvdan.cc/gofumpt from 0.2.1 to 0.3.0 (#2622)
    • d5ebd7eb build(deps): bump node-fetch in /.github/contributors (#2616)
    • 5ddb5e7a bump github.com/daixiang0/gci to v0.3.1 (#2596)
    • 56d77e2b bump github.com/denis-tingaikin/go-header from 0.4.2 to 0.4.3 (#2614)
    • 2f689958 errcheck: add an option to remove default exclusions (#2607)
    • 1f4c1ed9 fix: completion for fish-shell
    • 0c0804c6 go1.18 support (#2438)
    • 42ca6449 gofumpt: add module-path setting (#2644)
    • 30c6166b revive: fix default values (#2611)

    v1.44.2

    Changelog

    • cad735b2 build(deps): bump github.com/ultraware/whitespace from 0.0.4 to 0.0.5 (#2580)
    • eeda375f bump github.com/daixiang0/gci to HEAD (#2593)
    • 4f20929c gci: restore defaults for sections (#2589)

    v1.44.1

    Changelog

    • bf442005 Revert "build(deps): bump github.com/sylvia7788/contextcheck from 1.0.4 to 1.0.5 (#2534)" (#2538)
    • 39a76b86 build(deps): bump ajv from 6.12.2 to 6.12.6 in /.github/peril (#2564)
    • 9d047929 build(deps): bump github.com/breml/bidichk from 0.2.1 to 0.2.2 (#2572)
    • 18c25f79 build(deps): bump github.com/breml/errchkjson from 0.2.1 to 0.2.2 (#2559)

    ... (truncated)

    Changelog

    Sourced from github.com/golangci/golangci-lint's changelog.

    v1.45.2

    1. misc:
      • fix: help command

    v1.45.1

    1. updated linters:
      • interfacer: inactivate with go1.18
      • govet: inactivate unsupported analyzers (go1.18)
      • depguard: reduce requirements
      • structcheck: inactivate with go1.18
      • varnamelen: bump from v0.6.0 to v0.6.1
    2. misc:
      • Automatic Go version detection 🎉 (go1.18)
      • docker: update base images (go1.18)

    v1.45.0

    1. updated linters:
      • cobra: from 1.3.0 to 1.4.0
      • containedctx: from 1.0.1 to 1.0.2
      • errcheck: add an option to remove default exclusions
      • gci: from 0.3.1 to 0.3.2
      • go-header: from 0.4.2 to 0.4.3
      • gofumpt: add module-path setting
      • gofumpt: from 0.2.1 to 0.3.0
      • gopsutil: from 3.22.1 to 3.22.2
      • gosec: from 2.9.6 to 2.10.0
      • makezero: from 1.1.0 to 1.1.1
      • revive: fix default values
      • wrapcheck: from 2.4.0 to 2.5.0
    2. documentation:
      • docs: add "back to the top" button
      • docs: add forbidigo example that uses comments
      • docs: improve linters page
    3. misc:
      • go1.18 support 🎉
      • Add an option to manage the targeted version of Go
      • Default to YAML when config file has no extension

    v1.44.2

    1. updated linters:
      • gci: bump to HEAD
      • gci: restore defaults for sections
      • whitespace: from 0.0.4 to 0.0.5
    2. documentation:
      • add link to configuration in the linters list

    ... (truncated)

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies go 
    opened by dependabot[bot] 1
Releases(v1.5.1)
  • v1.5.1(Aug 27, 2021)

  • v1.5.0(Dec 8, 2020)

    https://github.com/go-reform/reform/milestones/v1.5.0

    • Generated code now passes Go 1.15's go vet. See https://github.com/go-reform/reform/issues/245 and https://github.com/go-reform/reform/issues/269.
    • Removed hard-coded dependency on sqlite3 package.
    • Updated dependencies and testing infrastructure.
    Source code(tar.gz)
    Source code(zip)
  • v1.4.1(Aug 31, 2020)

    https://github.com/go-reform/reform/milestones/v1.4.1

    • reform-db init command: fix PRIMARY KEY detection for MySQL.
    • Add testing with Go 1.15.
    • Updated dependencies.
    Source code(tar.gz)
    Source code(zip)
  • v1.4.0(Jul 29, 2020)

  • v1.4.0-beta1(Jun 25, 2020)

  • v1.3.4(Jun 25, 2020)

    https://github.com/go-reform/reform/milestones/v1.3.4

    • Make reform generator work with Go 1.15.
    • Replace syreclabs.com/go/faker with github.com/brianvoe/gofakeit.
    Source code(tar.gz)
    Source code(zip)
  • v1.3.3(Dec 11, 2018)

  • v1.3.2(Jul 23, 2018)

    https://github.com/go-reform/reform/milestones/v1.3.2

    • Go 1.8+ is now required due to changes in github.com/lib/pq driver.
    • Fixes in tests for MySQL 8, Go 1.10+ and latest versions of drivers.
    Source code(tar.gz)
    Source code(zip)
  • v1.3.1(Dec 7, 2017)

  • v1.3.0(Dec 1, 2017)

    https://github.com/go-reform/reform/milestones/v1.3.0

    • Go 1.7+ is now required.
    • Added reform-db command.
      • init subcommand may be used to generate Go model files for existing database schema.
      • query and exec subcommands may be used for accessing a database.
    • Fields with reform tag with value "-" are ignored now (just like with value "" and without tag at all).
    • Added ErrTxDone.
    • Added DB.DBInterface.
    • Added Querier.UpdateView.
    • reform command with -gofmt=false flag still formats generated sources with go/format package, without invoking gofmt. Thanks to João Pereira.
    • Added support for sqlserver variant of github.com/denisenkom/go-mssqldb driver.
    • Added support for Microsoft SQL Server for Linux.
    • We now have a logo! Huge thanks to Natalya Glebova for making it.
    Source code(tar.gz)
    Source code(zip)
  • v1.2.1(Sep 14, 2016)

    https://github.com/go-reform/reform/milestones/v1.2.1

    • reform tool now correctly handles non-exported types.
    • Querier.Insert now correctly INSERTs records with set non-integer primary keys, even if dialect uses LastInsertId (MySQL, SQLite3).
    Source code(tar.gz)
    Source code(zip)
  • v1.2.0(Aug 10, 2016)

    https://github.com/go-reform/reform/milestones/v1.2.0

    • Added support for Microsoft SQL Server. Huge thanks to Aleksey Martynov.
    • Added Querier.InsertColumns.
    • Querier.Insert now correctly handles records with only primary key column.
    Source code(tar.gz)
    Source code(zip)
  • v1.1.2(Jul 19, 2016)

    https://github.com/go-reform/reform/milestones/v1.1.2

    • reform tool now correctly ignores type information when it's not used. This allows one to have fields of any custom types. The only exception is primary key fields, which are restricted to basic types (numbers and strings).
    • Package gopkg.in/reform.v1/parse is explicitly documented as internal. (It's wasn't really possible to use it.)
    Source code(tar.gz)
    Source code(zip)
  • v1.1.1(Jul 5, 2016)

    https://github.com/go-reform/reform/milestones/v1.1.1

    • Querier.UpdateColumns no longer allows to update primary key column. This behavior was allowed, but did not make any sense.
    • reform tool now correctly handles pointers to custom types and slices.
    Source code(tar.gz)
    Source code(zip)
  • v1.1.0(Jul 5, 2016)

    https://github.com/go-reform/reform/milestones/v1.1.0

    • Added Querier.InsertMulti.
    • Added DBInterface, TXInterface, NewDBFromInterface, NewTXFromInterface.
    Source code(tar.gz)
    Source code(zip)
  • v1.0.0(Jun 22, 2016)

100% type-safe ORM for Go (Golang) with code generation and MySQL, PostgreSQL, Sqlite3, SQL Server support. GORM under the hood.

go-queryset 100% type-safe ORM for Go (Golang) with code generation and MySQL, PostgreSQL, Sqlite3, SQL Server support. GORM under the hood. Contents

Denis Isaev 660 May 9, 2022
Go-mysql-orm - Golang mysql orm,dedicated to easy use of mysql

golang mysql orm 个人学习项目, 一个易于使用的mysql-orm mapping struct to mysql table golang结构

magacy 2 Apr 17, 2022
Using-orm-with-db - Trying to use ORM to work with PostgreSQL

Using ORM with db This repo contains the training (rough) code, and possibly not

Pavel V 2 Jan 6, 2022
Simple and Powerful ORM for Go, support mysql,postgres,tidb,sqlite3,mssql,oracle, Moved to https://gitea.com/xorm/xorm

xorm HAS BEEN MOVED TO https://gitea.com/xorm/xorm . THIS REPOSITORY WILL NOT BE UPDATED ANY MORE. 中文 Xorm is a simple and powerful ORM for Go. Featur

null 6.5k May 11, 2022
Simple and performant ORM for sql.DB

Simple and performant ORM for sql.DB Main features are: Works with PostgreSQL, MySQL, SQLite. Selecting into a map, struct, slice of maps/structs/vars

Uptrace 894 May 14, 2022
Golang ORM with focus on PostgreSQL features and performance

go-pg is in a maintenance mode and only critical issues are addressed. New development happens in Bun repo which offers similar functionality but works with PostgreSQL, MySQL, and SQLite.

null 5.1k May 10, 2022
Examples of using various popular database libraries and ORM in Go.

Introduction Examples of using various popular database libraries and ORM in Go. sqlx sqlc Gorm sqlboiler ent The aim is to demonstrate and compare us

Hafiz Shafruddin 0 Dec 12, 2021
Examples of using various popular database libraries and ORM in Go.

Introduction Examples of using various popular database libraries and ORM in Go. sqlx sqlc Gorm sqlboiler ent The aim is to demonstrate and compare us

Hafiz Shafruddin 3 Mar 18, 2022
beedb is a go ORM,support database/sql interface,pq/mysql/sqlite

Beedb ❗ IMPORTANT: Beedb is being deprecated in favor of Beego.orm ❗ Beedb is an ORM for Go. It lets you map Go structs to tables in a database. It's

astaxie 709 Mar 8, 2022
A simple wrapper around sql.DB to help with structs. Not quite an ORM.

go-modeldb A simple wrapper around sql.DB to help with structs. Not quite an ORM. Philosophy: Don't make an ORM Example: // Setup require "modeldb" db

Jae Kwon 17 Nov 16, 2019
ORM-ish library for Go

We've moved! gorp is now officially maintained at: https://github.com/go-gorp/gorp This fork was created when the project was moved, and is provided f

James Cooper 53 Nov 22, 2021
Simple Go ORM for Google/Firebase Cloud Firestore

go-firestorm Go ORM (Object-relational mapping) for Google Cloud Firestore. Goals Easy to use Non intrusive Non exclusive Fast Features Basic CRUD ope

Jens Kjær Schødt 28 May 8, 2022
Database agnostic ORM for Go

If you are looking for something more lightweight and flexible, have a look at jet For questions, suggestions and general topics visit the group. Inde

Erik Aigner 693 May 6, 2022
QBS stands for Query By Struct. A Go ORM.

Qbs Qbs stands for Query By Struct. A Go ORM. 中文版 README ChangeLog 2013.03.14: index name has changed to {table name}_{column name}. For existing appl

Evan Zhou 548 May 1, 2022
Generate a Go ORM tailored to your database schema.

SQLBoiler is a tool to generate a Go ORM tailored to your database schema. It is a "database-first" ORM as opposed to "code-first" (like gorm/gorp). T

Volatile Technologies Inc. 4.9k May 12, 2022
An orm library support nGQL for Golang

norm An ORM library support nGQL for Golang. Overview Build insert nGQL by struct / map (Support vertex, edge). Parse Nebula execute result to struct

Zhihu 65 May 9, 2022
golang orm

korm golang orm, 一个简单易用的orm, 支持嵌套事务 安装 go get github.com/wdaglb/korm go get github.com/go-sql-driver/mysql 支持数据库 mysql https://github.com/go-sql-driv

null 6 Oct 11, 2021
GorosePro(Go ORM),这个版本是Gorose的专业版

GorosePro(Go ORM),这个版本是Gorose的专业版

火线兔 2 Mar 30, 2022
The fantastic ORM library for Golang, aims to be developer friendly

GORM The fantastic ORM library for Golang, aims to be developer friendly. Overview Full-Featured ORM Associations (Has One, Has Many, Belongs To, Many

Yadhu Sasidharan 0 Nov 11, 2021