Code Monkey home page Code Monkey logo

gorose-pro's Introduction

GoRose-ORM-Pro 完全免费的数据库ORM

GoDoc Go Report Card GitHub release GitHub GitHub All Releases gorose-orm

 ██████╗  ██████╗ ██████╗  ██████╗ ███████╗███████╗    ██████╗ ██████╗  ██████╗ 
██╔════╝ ██╔═══██╗██╔══██╗██╔═══██╗██╔════╝██╔════╝    ██╔══██╗██╔══██╗██╔═══██╗
██║  ███╗██║   ██║██████╔╝██║   ██║███████╗█████╗█████╗██████╔╝██████╔╝██║   ██║
██║   ██║██║   ██║██╔══██╗██║   ██║╚════██║██╔══╝╚════╝██╔═══╝ ██╔══██╗██║   ██║
╚██████╔╝╚██████╔╝██║  ██║╚██████╔╝███████║███████╗    ██║     ██║  ██║╚██████╔╝
 ╚═════╝  ╚═════╝ ╚═╝  ╚═╝ ╚═════╝ ╚══════╝╚══════╝    ╚═╝     ╚═╝  ╚═╝ ╚═════╝ 

EnglishDOC

English Document

原版和Pro版本区别(原版没有的功能)+(猜你关心)

  • 反馈群:94537310
  • 100%兼容原版
  • 本项目已经包含所有Gorose的更新以及Bug修复以及Issues中提到但未修复的问题
  • 更加适合ThinkPHP/Laravel开发人员
  • go get -u 直接升级,每次升级均做到向上向下兼容无需担心更新后不兼容导致的事故
  • 更深度支持MySQL和MariaDB
  • 详细文档支持
  • 更快的PR/BUG响应+修复速度
  • 所有的更新/Bug修复完全来自于当前正在编写的商业项目,不可能出现更新后不管的情况
  • (*Pro)支持事务嵌套
  • (*Pro)支持复杂Where/OrWhere条件下的and/or条件查询(复杂环境下极好用!)
  • (*Pro)CountGroup使用GroupBy的时候返回正确的行数
  • (*Pro)SubQuery,安全链式参数化查询操作无需编写语句,生成From subquery语句
  • (*Pro)SubWhere,安全链式参数化子查询,生成Where field in/=/like... subquery
  • (*Pro)修复原版Paginator会出现函数不正确的BUG,高效不出错
  • (*Pro)PagiantorWG高性能多线程分页器性能指示
  • (*Pro)修复Executor可能导致故障或删除据的问题
  • (*Pro)Oracle数据库支持Replace()方法

为什么要使用本项目?

  • 项目支持周期2021-10~2028-8
  • 费用:本项目完全免费,劳烦Star
  • 本项目已用在金融支付商城教育等项目中,以及GOV项目
  • 目前我的项目没有因为GorosePro炸过,可以放心使用
  • 立项原因:原版商项开发时缺失很多功能,且已无人维护
  • 原版事务死局:事务在跨模块调用时异常繁琐且没有多级/分级回退功能,这将导致如果你的程序需要设计订单支付功能,在这里有很大的坑等着你
  • 原版在实现复杂需求时的代码冗余度非常高,原因是原版更符合面向过程式的开发环境,Pro版本同时支持面向过程和面向对象

故障修复(原版未修)

  • 修复了高并发下,where等参数的的脏数据问题(如果你在用原版,避免生产环境使用单db)
  • 修复了Paginate不能用的问题,并且新增Paginator,以及PaginatorWG多线程查询
  • 修复原版Count和GroupBy同时使用时会出现的Total(总条数)错误的问题
  • 新增Counts兼容并修复原版复杂场景下Count不按条数计数的问题
  • 修复原版Oracle不可用问题,替换驱动使M1以后的ARM芯片可直连

商业项目验证

  • MySQL支持已验证
    • 全版本支持
    • AliYun-RDS-MySQL8
    • BT
      • 8.0.11
      • 8.0.34+
  • MariaDB支持已验证
    • 全版本支持
    • BT
      • 10.5
      • 10.7
    • 10.10
  • Oracle支持已验证
    • 12XE

实例文档(Wiki)

说明:*为GorosePro独有功能

简介

GorosePro是一个GolangOrm升级改版项目,在支持原框架所有功能的基础上修复了BUG,更加适合复杂的商业项目

支持解耦式开发和直觉式编程,大大降低你的试错成本,让小型项目开发速更快,让大型项目更加容易维护

安装

  • go.mod 中添加
require github.com/tobycroft/gorose-pro v1.12.12
  • go get
go get -u github.com/tobycroft/gorose-pro

支持驱动

配置和链接初始化

更多配置, 可以配置集群,甚至可以同时配置不同数据库在一个集群中, 数据库会随机选择集群的数据库来完成对应的读写操作, 其中master是写库, slave是读库, 需要自己做好主从复制, 这里只负责读写

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",
}

初始化使用

var engin *gorose.Engin
engin, err := Open(config)
//engin, err := Open(configCluster)

if err != nil {
panic(err.Error())
}

TODO

  • 加入缓存层
    • 如果不使用Struct来接收返回,可能会导致Hash返回的Column类型从非string统一变成string(这是Redis的问题)
    • 在开启缓存功能后避免使用断言是比较简单的解决方案,如果吧类型也存在Redis里面,固然能简单的解决但是也会增加Redis的链接负载
  • 可选泛型返回...已完成
  • ElasticSearch
    • 数据自动上载
    • 从ES中读取数据

Stargazers over time

Stargazers over time

gorose-pro's People

Contributors

tobycroft avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.