package
0.0.0-20240311064956-9d85d0065498
Repository: https://github.com/coderi421/kyuu.git
Documentation: pkg.go.dev

# Packages

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Functions

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
AssignColumns returns a list of Assignable values for the given entity, filtered by the provided filter function.
AssignNotNilColumns @Description: 判断是否是 Nil, 如果是 nil 那么调用 assign 的时候,就不处理这个字段 @param entity @return []Assignable.
AssignNotZeroColumns @Description: 判断是否是零值, 如果是零值 那么调用 assign 的时候,就不处理这个字段 @param entity @return []Assignable.
Avg @Description: 求平均值 @param c column,聚合函数中填写的字段 @return Aggregate.
No description provided by the author
Count @Description: 获取数量 @param c column,聚合函数中填写的字段 @return Aggregate.
DBUseReflectValuer 如果想使用反射进行获取相关信息,则调用这个 option.
DBWithRegistry 这里可以替换成不同的映射实例.
No description provided by the author
DBWithRegistry 这里可以替换成不同的映射实例.
No description provided by the author
No description provided by the author
Max @Description: 求最大值 @param c column,聚合函数中填写的字段 @return Aggregate.
Min @Description: 求聚合函数中填写的最小值 @param c column,聚合函数中填写的字段 @return Aggregate.
MustNewDB creates a new DB with the provided options.
NewSelector creates a new instance of Selector.
No description provided by the author
NewSelector creates a new instance of Selector.
No description provided by the author
No description provided by the author
Open opens a database connection using the specified driver and DSN.
OpenDB 根据用户传递进来的 db 直接初始化 db 实例.
Raw 创建一个 RawExpr 执行原生sql 语句.
No description provided by the author
No description provided by the author
Sum @Description: 求和 @param c @return Aggregate.
No description provided by the author

# Variables

ErrNoRows 代表没有找到数据.
No description provided by the author
No description provided by the author

# Structs

Aggregate 代表聚合函数, 例如 AVG, MAX, MIN 等 以及别名.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
QueryContext 中间件的上下文,冗余了 Builder model 等,是因为还没有执行 sql 前,有的中间件,需要使用这些信息, 这里优化还可以考虑 构建 builder 后的 sql 拼接结果,省的每次调用都需要调用 builder 进行拼接 sql, 这里没这么做,可能因为怕别人篡改?.
No description provided by the author
RawExpr 代表一个原生表达式 意味着 ORM 不会对它进行任何处理.
No description provided by the author
No description provided by the author
Selector represents a query selector that allows building SQL SELECT statements.
No description provided by the author
SubqueryExpr 注意,这个谓词这种不是在所有的数据库里面都支持的 这里采取的是和 Upsert 不同的做法 Upsert 里面我们是属于用 dialect 来区别不同的实现 这里我们采用另外一种方案,就是直接生成,依赖于数据库来报错 实际中两种方案你可以自由替换.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Interfaces

Assignable 标记接口, 实现该接口意味着可以用于赋值语句, 用于在 UPDATE 和 UPSERT 中 Assign("FirstName", "DaMing") -> SET`first_name`=?.
No description provided by the author
No description provided by the author
Expression 代表语句,或者语句的部分 暂时没想好怎么设计方法,所以直接做成标记接口.
No description provided by the author
No description provided by the author
Selectable 暂时没什么作用只是用作标记,可检索指定字段的标记 让结构体实现这个接口,就可以传入 使用接口为的是:让 聚合函数, columns, 以及 RawExpr(原生sql) 都能作为参数传入统一个函数,做统一处理.
Session 代表一个抽象的概念,即会话 暂时做成私有的,后面考虑重构,因为这个东西用户可能有点难以理解.
No description provided by the author

# Type aliases

No description provided by the author
No description provided by the author
MathExpr 为非导出 struct 创建类型 update 过程中的计算方法.
No description provided by the author
Predicate 代表一个查询条件 Predicate 可以通过和 Predicate 组合构成复杂的查询条件 type Predicate struct { left Expression op op right Expression }.