Comments (2)
Hello author, I'm not sure if it's possible to add a universal structure processing method. I encountered a problem while using it. I put the common fields create_time, create_id, update_time, and update_id in a BaseModel structure and used them in the structure I'm using. However, when querying the returned value, I won't be able to retrieve and map all the values in this BaseMode structure to the corresponding base field. Is there a solution like this? ` pub struct BaseModel { pub create_time: Option, pub create_id: Option, pub update_time: Option, pub update_id: Option, }
pub struct SubModel{ pub base: Option, pub user_name: Option, pub real_name: Option, pub available: Option, } `
see https://github.com/rbatis/rbatis/blob/master/example/src/table_extend.rs
from rbatis.
Thinks! But I encountered another plugin executing the modified SQL, and at the end of the execution, it was not the modified SQL, but the SQL before the modification. May I ask why this is?
from rbatis.
Related Issues (20)
- Hello, I have encountered a question: functions in traits cannot be declared `async` HOT 2
- When using enumeration, can it support automatic conversion to integer when saving or updating, and automatically convert integer to enumeration when selecting? HOT 2
- Intermittent Delays in Query Execution After Periods of Inactivity HOT 4
- MSSQL using transactions error: token error: 'Incorrect syntax near 'begin'.' on server MSSQL2016 executing on line 1 (code: 102, state: 1, class: 15) HOT 2
- crud insert is error when the primary key column name is not id
- html_sql can't trim uppercase "and|or" after where HOT 1
- htmlsql_select_page field is filtered problem HOT 2
- The json field of the database is returned as an escaped string HOT 2
- Setting result error using py_sql with single result HOT 1
- Is there any synchronized Chinese document? HOT 3
- Unable to update column to null.
- Prior code to get SQLite version using sqlite_version() works. Now broken. [Solved Manually. See comments] HOT 2
- test_decode_time_zone error
- Variable `recordsValue` should have snake_case name, e.g. `records_value` HOT 5
- The document needs to be updated HOT 2
- How to dynamically specify schema HOT 14
- add return primary key value in postgresql HOT 1
- How to use tracing log in rbatis-v4 version HOT 2
- field value with json string, return invalid type: map, expected String error HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rbatis.