Comments (2)
Hi. This is because Row::get
by itself returns an Option
, so if cell type is Option<String>
, then the return type of the get function is Option<Option<String>>
.
Btw, I would call the get
function low level, try something like this instead:
let Some((guid_user, nick_name, email, phone)) = conn.exec_first(q,p).await? else {
return Ok(None);
};
Ok(UserInfo {
guid_user,
nick_name,
email,
phone,
});
from mysql_async.
Hi. This is because
Row::get
by itself returns anOption
, so if cell type isOption<String>
, then the return type of the get function isOption<Option<String>>
. Btw, I would call theget
function low level, try something like this instead:let Some((guid_user, nick_name, email, phone)) = conn.exec_first(q,p).await? else { return Ok(None); }; Ok(UserInfo { guid_user, nick_name, email, phone, });
Thank you very much! I will have a try.
from mysql_async.
Related Issues (20)
- When inserting data in bulk, parsing parameter errors were found HOT 3
- Make connection_like::ToConnection public
- Re-export "chrono" feature from mysql_common HOT 3
- pass prefer_socket=false is not effective HOT 1
- TCP keepalive definition may be better expressed in seconds HOT 2
- I see that mysql_common has already updated the version, so when can the new version of mysql_async be pushed to crates.io? HOT 1
- Documentation seems outdated HOT 3
- When use the query_stream method, the error "bytes remaining on stream" occurs. HOT 1
- Questions from Rust newbies HOT 1
- sql_mode=ANSI_QUOTES causes `UnknownStatusFlags(32770)` error when trying to connect to MariaDB 11.2 HOT 1
- Example does not compile
- add support for connection compression-algorithms HOT 1
- mysql_native_password or caching_sha2_password HOT 3
- Is pools close if their ownership moves? HOT 6
- skip_domain_validation not working when using rustls
- multi query and BinaryProtocol HOT 2
- New release for mysql_common 0.32?
- v0.34.0 , FromRow macro not work HOT 3
- multi query not error HOT 1
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 mysql_async.