██████╗ ██████╗ ██████╗ ██████╗ ███████╗███████╗ ██████╗ ██████╗ ██████╗
██╔════╝ ██╔═══██╗██╔══██╗██╔═══██╗██╔════╝██╔════╝ ██╔══██╗██╔══██╗██╔═══██╗
██║ ███╗██║ ██║██████╔╝██║ ██║███████╗█████╗█████╗██████╔╝██████╔╝██║ ██║
██║ ██║██║ ██║██╔══██╗██║ ██║╚════██║██╔══╝╚════╝██╔═══╝ ██╔══██╗██║ ██║
╚██████╔╝╚██████╔╝██║ ██║╚██████╔╝███████║███████╗ ██║ ██║ ██║╚██████╔╝
╚═════╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝ ╚══════╝╚══════╝ ╚═╝ ╚═╝ ╚═╝ ╚═════╝
- All functionality was updated to the latest version from the original version
- Intuition Coding
- Nested Transactions functionality
- Simple update without any hesitation ,fully compatible with earlier versions
- Fully support MySQL and MariaDB
- Document support as detail as possible
- 100% compatible with original function
- Dealing PR & Bug fix much more sooner
- All function has been tested and verified by commercial projects
- Support complexity and/or sql in Where/OrWhere function
- Paginator is now able to return the correct TOTAL number
- Add CountGroup to return correct row count from sql sentence
- SubQuery: Highly security parameterized query under prepared condition
- SubWhere: Full Prepared condition parameterized where sql searching
- Fixed original framework's Executor might have unintentionally error or deleted data
- Oracle support "Replace()" function like MyBatis when a good performance
- Fee: Totally Free but only need your star
- Avoid the risk of the deprecation of the original ver
- To solve the shortage during coding in the real life
- Massive demos from the document, what ever the skill you are, you still able to find a solution here
- Dirty Read under concurrency circumstances(this will be only and easily triggered by using *db mode)
- Paginate fixed, this function finally come back to life, new "Paginator" function make it much more easier to use
- Fix the row_count(Total in Paginator mode) when using GroupBy function
- Fix Oracle unable to connect & use problem, Fixed arm MacM1 chip's compatibility with Oracle
Notice:'*' means Only Support In GorosePro
- CUD functions
- Read the first line data and return in map[string]any
- Read multiple data in array by []map[string]any
- Raw SQL sentence mode
- Nested Transaction(only support in GorosePro)
- subQuery
- Security and Performance
- Single/Multiple data to struct(Struct)
Gorosepro is an upgrade and revision project of GOORM. It fixes bugs on the basis of supporting all functions of the original framework and is more suitable for complex commercial projects
Support decoupling development and intuitive programming, greatly reduce your trial and error cost, make small projects develop faster, and make large projects easier to maintain
- Add in go.mod
require github.com/tobycroft/gorose-pro v1.2.5
- go get
go get -u github.com/tobycroft/gorose-pro
- mysql : https://github.com/go-sql-driver/mysql
- sqlite3 : https://github.com/mattn/go-sqlite3
- postgres : https://github.com/lib/pq
- oracle : https://github.com/sijms/go-ora
- mssql : https://github.com/denisenkom/go-mssqldb
- clickhouse : https://github.com/kshvakov/clickhouse
For more configurations, you can configure the cluster, or even configure different databases at the same time. In a cluster, the database will randomly select the database of the cluster to complete the corresponding read-write operations. The master is the write database, and the slave is the read database. You need to do master-slave replication. Here, you are only responsible for reading and writing
var config1 = gorose.Config{Dsn: 上面的dsn}
var config2 = gorose.Config{Dsn: 上面的dsn}
var config3 = gorose.Config{Dsn: 上面的dsn}
var config4 = gorose.Config{Dsn: 上面的dsn}
var configCluster = &gorose.ConfigCluster{
Master: []gorose.Config{config3, config4},
Slave: []gorose.Config{config1, config2},
Driver: "sqlite3",
}
Initialize then use
var engin *gorose.Engin
engin, err := Open(config)
//engin, err := Open(configCluster)
if err != nil {
panic(err.Error())
}