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 upTables appear to be limited in number of columns #500
Comments
This comment has been minimized.
|
I think what you are looking for are diesel's 'large-table' and
'huge-table' features that allow tables to have more columns. You can
activate (one of) them in your Cargo.toml file.
noyez <notifications@github.com> schrieb am Mi. 23. Nov. 2016 um 22:14:
… I am a Rust beginner, so I apologize if this is not a bug and that i
missed something obvious.
rust version: rustc 1.13.0 (2c6933acc 2016-11-07)
diesel version: 0.8.0 (using getting_started_step_4 projects as template)
I attempted to use a table with 17 fields using the diesel framework and
compilation fails. Compilation succeeds with 16 fields. Attached (
diesel-many-fields.tar.gz
<https://github.com/diesel-rs/diesel/files/610016/diesel-many-fields.tar.gz>
) is a modified project based from the examples/getting_started_step_4
project. The tar file can be unpacked in the examples/ directory, and the
script test_stable.large can be run compile the code.
Of Note, line 30 in src/models.rs and line 15 in
migrations/20160815133237_create_posts/up.sql. if each line is commented
out, the code compiles, if each line is active, code does not compile.
error[E0277]: the trait bound `(schema::posts_large::columns::f_00, schema::posts_large::columns::f_01, schema::posts_large::columns::f_02, schema::posts_large::columns::f_03, schema::posts_large::columns::f_04, schema::posts_large::columns::f_05, schema::posts_large::columns::f_06, schema::posts_large::columns::f_07, schema::posts_large::columns::f_08, schema::posts_large::columns::f_09, schema::posts_large::columns::f_10, schema::posts_large::columns::f_11, schema::posts_large::columns::f_12, schema::posts_large::columns::f_13, schema::posts_large::columns::f_14, schema::posts_large::columns::f_15, schema::posts_large::columns::f_99): diesel::SelectableExpression<schema::posts_large::table, (diesel::types::Integer, diesel::types::Text, diesel::types::Text, diesel::types::Nullable<diesel::types::Text>, diesel::types::Nullable<diesel::types::Text>, diesel::types::Nullable<diesel::types::Text>, diesel::types::Nullable<diesel::types::Text>, diesel::types::Nullable<diesel::types::Text>, diesel::types::Nullable<diesel::types::Text>, diesel::types::Nullable<diesel::types::Text>, diesel::types::Nullable<diesel::types::Text>, diesel::types::Nullable<diesel::types::Text>, diesel::types::Nullable<diesel::types::Text>, diesel::types::Nullable<diesel::types::Text>, diesel::types::Nullable<diesel::types::Text>, diesel::types::Nullable<diesel::types::Text>, diesel::types::Bool)>` is not satisfied
--> src/lib.rs:12:1
|
12 | include!(concat!(env!("OUT_DIR"), "/lib.rs"));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ trait `(schema::posts_large::columns::f_00, schema::posts_large::columns::f_01, schema::posts_large::columns::f_02, schema::posts_large::columns::f_03, schema::posts_large::columns::f_04, schema::posts_large::columns::f_05, schema::posts_large::columns::f_06, schema::posts_large::columns::f_07, schema::posts_large::columns::f_08, schema::posts_large::columns::f_09, schema::posts_large::columns::f_10, schema::posts_large::columns::f_11, schema::posts_large::columns::f_12, schema::posts_large::columns::f_13, schema::posts_large::columns::f_14, schema::posts_large::columns::f_15, schema::posts_large::columns::f_99): diesel::SelectableExpression<schema::posts_large::table, (diesel::types::Integer, diesel::types::Text, diesel::types::Text, diesel::types::Nullable<diesel::types::Text>, diesel::types::Nullable<diesel::types::Text>, diesel::types::Nullable<diesel::types::Text>, diesel::types::Nullable<diesel::types::Text>, diesel::types::Nullable<diesel::types::Text>, diesel::types::Nullable<diesel::types::Text>, diesel::types::Nullable<diesel::types::Text>, diesel::types::Nullable<diesel::types::Text>, diesel::types::Nullable<diesel::types::Text>, diesel::types::Nullable<diesel::types::Text>, diesel::types::Nullable<diesel::types::Text>, diesel::types::Nullable<diesel::types::Text>, diesel::types::Nullable<diesel::types::Text>, diesel::types::Bool)>` not satisfied
|
= note: required because of the requirements on the impl of `diesel::query_builder::Query` for `diesel::query_builder::SelectStatement<(diesel::types::Integer, diesel::types::Text, diesel::types::Text, diesel::types::Nullable<diesel::types::Text>, diesel::types::Nullable<diesel::types::Text>, diesel::types::Nullable<diesel::types::Text>, diesel::types::Nullable<diesel::types::Text>, diesel::types::Nullable<diesel::types::Text>, diesel::types::Nullable<diesel::types::Text>, diesel::types::Nullable<diesel::types::Text>, diesel::types::Nullable<diesel::types::Text>, diesel::types::Nullable<diesel::types::Text>, diesel::types::Nullable<diesel::types::Text>, diesel::types::Nullable<diesel::types::Text>, diesel::types::Nullable<diesel::types::Text>, diesel::types::Nullable<diesel::types::Text>, diesel::types::Bool), (schema::posts_large::columns::f_00, schema::posts_large::columns::f_01, schema::posts_large::columns::f_02, schema::posts_large::columns::f_03, schema::posts_large::columns::f_04, schema::posts_large::columns::f_05, schema::posts_large::columns::f_06, schema::posts_large::columns::f_07, schema::posts_large::columns::f_08, schema::posts_large::columns::f_09, schema::posts_large::columns::f_10, schema::posts_large::columns::f_11, schema::posts_large::columns::f_12, schema::posts_large::columns::f_13, schema::posts_large::columns::f_14, schema::posts_large::columns::f_15, schema::posts_large::columns::f_99), schema::posts_large::table>`
= note: required by `diesel::query_builder::AsQuery`
= note: this error originates in a macro outside of the current crate
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#500>, or mute the thread
<https://github.com/notifications/unsubscribe-auth/AABOXxxKj82rPjgb4Wv8TVTSLRkXpvenks5rBKzTgaJpZM4K7Db7>
.
|
This comment has been minimized.
noyez
commented
Nov 24, 2016
|
Thank you, this is indeed that case. I added the following to Cargo.toml, and it compiled successfully.
|
noyez
closed this
Nov 24, 2016
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
noyez commentedNov 23, 2016
I am a Rust beginner, so I apologize if this is not a bug and that i missed something obvious.
rust version: rustc 1.13.0 (2c6933acc 2016-11-07)
diesel version: 0.8.0 (using getting_started_step_4 projects as template)
I attempted to use a table with 17 fields using the diesel framework and compilation fails. Compilation succeeds with 16 fields. Attached ( diesel-many-fields.tar.gz ) is a modified project based from the examples/getting_started_step_4 project. The tar file can be unpacked in the examples/ directory, and the script test_stable.large can be run compile the code.
Of Note, line 30 in
src/models.rsand line 15 inmigrations/20160815133237_create_posts/up.sql. if each line is commented out, the code compiles, if each line is active, code does not compile.