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 upGeneric BoxedQuery for functions? #546
Comments
This comment has been minimized.
|
This code will look fairly ugly if it's generic, but this is roughly what you'd want: impl<T> ListData<T> where
T: Table,
{
pub fn set_page<'a, DB>(params: &Map, max_items: i64, source: BoxedSelectStatement<'a, T::SqlType, T, DB>) -> BoxedSelectStatement<'a, T::SqlType, T, DB> where
DB: Backend + HasSqlType<T::SqlType>,
{
// your code
}
}You may need to disambiguate |
sgrif
closed this
Jan 3, 2017
adrianbrink
referenced this issue
Jan 3, 2017
Closed
Have a different primary_key name on a struct instead of id when using diesel-rs #1
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
durango commentedDec 17, 2016
•
edited
Basically, trying to refactor code a bit for my app and have the following:
And then the error: