Utility library to manage shared connection in Golang.
- 'Prom' for go-redis.
- 'Prom' for the official Go driver for MongoDB.
- 'Prom' for database/sql.
- 'Prom' for AWS DyamoDB.
Go version, direct and tested dependencies: see go.mod.
AwsDynamodbConnect
:- New functions
BuildxxxInput
andxxxWithInput
. - Doc fixes and updates.
- New functions
AwsDynamodbConnect
:- Add new function
IsAwsError(err error, code string) bool
- No longer ignore certain AWS errors, lets caller decide to call
AwsIgnoreErrorIfMatched
if needed.
- Add new function
- Update dependency libs.
- Other fixes & enhancements.
AwsDynamodbConnect
:- New constants
AwsAttrTypeString
,AwsAttrTypeNumber
andAwsAttrTypeBinary
. - New constants
AwsKeyTypePartition
andAwsKeyTypeSort
. - Add transaction-supported functions.
- New constants
- Update dependency libs.
- Other fixes & enhancements.
MongoConnect
: fixed a bug that incorrectly creates collection index when passingmongo.IndexModel
as parameter.
- Change
MongoConnect.Ping(timeoutMs ...int)
toMongoConnect.Ping(ctx context.Context)
. - Bump Go version to
1.12
and update dependencies. - Other fixes & enhancements.
- 'Prom' for the official Go driver for MongoDB:
- Deprecate function
CreateIndexes
, replaced withCreateCollectionIndexes
.
- Deprecate function
- Add tests.
- New 'Prom' for AWS DyamoDB:
- For API consistency:
- New function
MongoConnect.Close(context.Context) error
to replaceDisconnect(ctx context.Context) error
. - New function
GoRedisConnect.Close() error
.
- New function
- 'Prom' for go-redis:
- Upgrade to github.com/go-redis/redis
v6.15.6
.
- Upgrade to github.com/go-redis/redis
- 'Prom' for the official Go driver for MongoDB:
- Upgrade to go.mongodb.org/mongo-driver
v1.1.2
.
- Upgrade to go.mongodb.org/mongo-driver
- 'Prom' for database/sql:
- Upgrade to gopkg.in/goracle.v2
v2.21.4
.
- Upgrade to gopkg.in/goracle.v2
- 'Prom' for go-redis:
- Upgrade to github.com/go-redis/redis
v6.15.5
.
- Upgrade to github.com/go-redis/redis
- 'Prom' for the official Go driver for MongoDB:
- Upgrade to go.mongodb.org/mongo-driver
v1.1.1
. - Fixed bug
"no documents in result"
- Upgrade to go.mongodb.org/mongo-driver
- 'Prom' for database/sql:
- Upgrade to github.com/lib/pq
v1.2.0
. - Upgrade to gopkg.in/goracle.v2
v2.20.1
.
- Upgrade to github.com/lib/pq
- 'Prom' for database/sql:
- Add timezone location attribute to
SqlConnect
struct. - Correctly parse date/time data from db using timezone location attribute.
- Add timezone location attribute to
- 'Prom' for database/sql: solve the case when Mysql's
TIME
is loaded as[]byte
.
- Migrated Go modular design.
- Add
DbFlavor
:- New method
NewSqlConnectWithFlavor
- New method
SqlConnect.fetchOneRow
fetches correct column's data type instead of[]byte
for MySQL. This makes results ofSqlConnect.FetchRows
andSqlConnect.FetchRowsCallback
are correctly typed, too.- Update examples for MongoDB, MySQL and PostgreSQL.
- Add examples for MSSQL and Oracle DB.
- 'Prom' for database/sql:
- Usage examples: MySQL, PostgreSQL
- 'Prom' for the official Go driver for MongoDB: add 2 functions
DecodeSingleResultRaw(*mongo.SingleResult) (string, error)
DecodeResultCallbackRaw(context.Context, *mongo.Cursor, func(docNum int, doc string, err error))
- Bug fixes & refactoring.
- 'Prom' for the official Go driver for MongoDB:
- Bug fixes, enhancements & refactoring
- Add usage examples
- New 'Prom' for go-redis:
- Function
DecodeSingleResult
andDecodeResultCallback
are now attached to*MongoConnect
- Change Mongo's timeout parameter from
int64
toint
- 'Prom' for the official Go driver for MongoDB (https://github.com/mongodb/mongo-go-driver)
MIT - see LICENSE.md.