Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upHow can I use the raw sql? #1294
Comments
This comment has been minimized.
|
You are most likely looking at the API docs for the master branch, where
this was changed.
Here is the doc for 0.16:
https://docs.rs/diesel/0.16.0/diesel/expression/dsl/fn.sql.html
漂流 <notifications@github.com> schrieb am So. 5. Nov. 2017 um 09:45:
… Hi, all, I encountered a problem, the output:
error[E0425]: cannot find function `sql_query` in module `diesel`
--> src/models/articles.rs:31:27
|
31 | let res = diesel::sql_query(format!("select * from article_with_tag where id={} and published={}", id, admin))
| ^^^^^^^^^ not found in `diesel`
the cargo.toml:
[dependencies.diesel]
features = ["postgres", "chrono"]
version = "^0.16.0"
[dependencies.chrono]
features = ["serde"]
version = "^0.4.0"
[dependencies.diesel_codegen]
features = ["postgres"]
version = "^0.16.0"
Document said there has the sql_querymethod, but here is wrong, I want to
know how to call the native sql operation
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#1294>, or mute the thread
<https://github.com/notifications/unsubscribe-auth/AABOX1zc36Z4zmPaKb25r4AQBGow16w_ks5szXWpgaJpZM4QSTkB>
.
|
This comment has been minimized.
driftluo
commented
Nov 5, 2017
|
Oh, thanks, However, at the moment crates' docs and readme's docs both point to the wrong address, which has a negative effect on the work |
This comment has been minimized.
|
Good point! we should give two links in the Readme (as you are probably
looking at it in the repo's master branch) and link to docs.rs in the
Cargo.toml.
漂流 <notifications@github.com> schrieb am So. 5. Nov. 2017 um 11:08:
… Oh, thanks, However, at the moment crates' docs and readme's docs both
point to the wrong address, which has a negative effect on the work
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#1294 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AABOX93gHajoXZWIVLo4UbaiWLFyQgKtks5szYkUgaJpZM4QSTkB>
.
|
killercup
added
the
question
label
Nov 5, 2017
This comment has been minimized.
|
I opened #1295 to change the documentation links. As this issue is about how to use raw SQL, I'll close it. Thanks again! |
killercup
closed this
Nov 5, 2017
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
driftluo commentedNov 5, 2017
•
edited
Hi, all, I encountered a problem, the output:
the cargo.toml:
Document said there has the
sql_querymethod, but here is wrong, I want to know how to call the native sql operation