Comments (2)
Looking at the front page example:
#[derive(QueryableByName)]
#[diesel(table_name = users)]
struct User {
id: i32,
name: String,
organization_id: i32,
}
// Using `include_str!` allows us to keep the SQL in a
// separate file, where our editor can give us SQL specific
// syntax highlighting.
sql_query(include_str!("complex_users_by_organization.sql"))
.bind::<Integer, _>(organization_id)
.bind::<BigInt, _>(offset)
.bind::<BigInt, _>(limit)
.load::<User>(&mut conn)?;
Note that we're trusted to know the order and type of args going into the query, but we absolutely must use a fruity struct to get anything out. This seems really weird to me.
from diesel.rs-website.
I'm closing this as this is totally the wrong place for such a discussion (This is the issue tracker for the web page, not for diesel itself. If you are interested in a real discussion fell free to open a new discussion thread in the diesel repo. (I would also suggest that you don't use sarcastic language there to talk about the work of other people if you expect any answer).
from diesel.rs-website.
Related Issues (20)
- Https redirect HOT 1
- Format wast view screen real estate HOT 1
- Update the getting started guide to diesel 2.0 HOT 1
- Update the "All about updates" guide to diesel 2.0 HOT 1
- Update the "All about inserts" guide to diesel 2.0 HOT 5
- Update the "Composing applications with diesel" guide to diesel 2.0 HOT 1
- Update the "Schema in depth" guide to diesel 2.0
- Update the "Extending diesel" guide to diesel 2.0
- Update the "Configuring diesel cli" guide to diesel 2.0
- Issues building site with fresh repository clone on MacOS HOT 5
- Improve website by telling what the project is about HOT 1
- GH action/precompiled binaries HOT 2
- Community projects HOT 3
- Footer outdated
- Build with a more recent version of pandoc ( > 2.11 ) HOT 1
- Feature Request: impl<'a, Parent, Child> BelongingToDsl<(&'a [Parent], &'a [Parent])> for Child HOT 1
- returning_clauses_for_sqlite_3_35 flag not working HOT 1
- Typo in migration file name HOT 1
- The Getting Started Guide should have an example for getting single item HOT 5
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 diesel.rs-website.