type mysqlArticleRepository struct{DB*gorm.DB}// NewMysqlArticleRepository will create an object that represent the article.Repository interfacefuncNewMysqlArticleRepository(DB*gorm.DB)IArticleRepo{return&mysqlArticleRepository{DB}}func(m*mysqlArticleRepository)Fetch(ctx context.Context,createdDate time.Tim...
typemysqlArticleRepositorystruct{ DB *gorm.DB }// NewMysqlArticleRepository will create an object that represent the article.Repository interfacefuncNewMysqlArticleRepository(DB *gorm.DB)IArticleRepo {return&mysqlArticleRepository{DB} }func(m *mysqlArticleRepository)Fetch(ctx context.Context, createdDate...
//结合gorm、sqlmock gormDB,err=gorm.Open(mysql.New(mysql.Config{ SkipInitializeWithVersion:true, Conn:db, }),&gorm.Config{}) ifnil!=err{ log.Fatalf("InitDBwithsqlmockfailed,err%v",err) } return } funcTest_mysqlArticleRepository_Fetch(t*testing.T){ createAt:=time.Now() updateAt:=tim...
https://github.com/go-gorm/gen https://github.com/satori/go.uuid https://github.com/xntrik/hcltm https://github.com/bp0lr/gauplus https://github.com/lox/bkl https://github.com/goretk/gore | 用于分析Go二进制文件的库 | 204 https://github.com/zh-five/xdaemon | 一个让go程序快速...
godfish - Database migration manager, works with native query language. Support for cassandra, mysql, postgres, sqlite3. goose - Database migration tool. You can manage your database's evolution by creating incremental SQL or Go scripts. gorm-seeder - Simple database seeder for Gorm ORM. gor...
go-pg-migrations - A Go package to help write migrations with go-pg/pg. goose - Database migration tool. You can manage your database’s evolution by creating incremental SQL or Go scripts. gormigrate - Database schema migration helper for Gorm ORM. migrate - Database migrations. CLI and...
gorm-sharding - 基于 Conn 层做 SQL 拦截、AST 解析、分表路由、自增主键填充,对使用者透明 Xorm XormPlus - Xorm 的定制增强版本 GoRose sqlx - database/sql 扩展包 dbq - 数据库操作 gendry - 滴滴开源的SQL Builder ozzo-dbx Squirrel - Fluent SQL Builder qb - the database toolkit for go redigo...
gorm - An ORM library for Go, aims for developer friendly gorp - SQL mapper for Go hood - Database agnostic ORM for Go. Supports Postgres and MySQL. qbs - Query By Struct. Supports MySQL, PosgreSQL and SQLite3. xorm - A Simple and Powerful ORM for Go. go-modeldb - A simpl...
gorm - An ORM library for Go, aims for developer friendly gorp - SQL mapper for Go hood - Database agnostic ORM for Go. Supports Postgres and MySQL. qbs - Query By Struct. Supports MySQL, PosgreSQL and SQLite3. xorm - A Simple and Powerful ORM for Go. go-modeldb - A simple wrappe...
gosql - SQL Query builder with better null values support. igor - Abstraction layer for PostgreSQL that supports advanced functionality and uses gorm-like syntax. jet - Framework for writing type-safe SQL queries in Go, with ability to easily convert database query result into desired arbitrary ...