当前在开发:
shanliu / sqlx-model Goto Github PK
View Code? Open in Web Editor NEW基于sqlx 轻量级orm实现
License: Apache License 2.0
基于sqlx 轻量级orm实现
License: Apache License 2.0
当前在开发:
包含 chrono 等的默认支持
包含:
1对1
1对多
多对1
多对多
以上4种关系配置
以公开暂定想法是通过宏方式做配置后生成一些方法
通过生成的方法来获取对应关系的数据
实现从 定义的结构体 上生成SQL DML的工具
预计要支持:
自定义字段类型,当未指定根据类型做映射
指定索引字段
fetch_all_by_where 因为会往 sql 中加 where 关键字 导致无 where 的时候需加 1=1 这样条件来规避. 需要一个更好的方式来避免这问题
通过宏把增删改查放到model结构上而不是现在的外部结构体
目前通过生成另一个结构来区分字段是否有值
准备改用替换option类型方式来实现 这样可以简化使用
对于实现 SqlQuote trait 是否有例子? 以及对于使用了sqlx:Type 宏的自定义类型 如何实现 SqlQuote trait
error[E0599]: no method named `sql_quote` found for reference `&chrono::DateTime<Utc>` in the current scope
--> src/entity/sys_config.rs:15:39
|
15 | #[derive(PartialEq, Debug, Clone, Eq, sqlx_model::SqlxModel)]
| ^^^^^^^^^^^^^^^^^^^^^ method not found in `&chrono::DateTime<Utc>`
|
= note: this error originates in the macro `$crate::model_table_ref_define` which comes from the expansion of the derive macro `sqlx_model::SqlxModel` (in Nightly builds, run with -Z macro-backtrace for more info)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.