You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We now use an explicit `compile_error!` call to produce a meaningful
error message if a user provided an unsupported number of columns for a
specific table. Before this change we would fail with a large error
message about unimplemented trait bounds.
"Table contains more than 16 columns. Consider enabling the `32-column-tables` feature to enable diesels support for tables with more than 16 columns."
1395
+
);
1396
+
1397
+
}
1398
+
}
1399
+
1400
+
1401
+
#[cfg(all(
1402
+
feature = "32-column-tables",
1403
+
not(feature = "64-column-tables"),
1404
+
not(feature = "128-column-tables")
1405
+
))]
1406
+
#[macro_export]
1407
+
#[doc(hidden)]
1408
+
macro_rules! __diesel_error_table_size {
1409
+
() => {
1410
+
compile_error!(
1411
+
"Table contains more than 32 columns. Consider enabling the `64-column-tables` feature to enable diesels support for tables with more than 32 columns."
1412
+
);
1413
+
1414
+
}
1415
+
}
1416
+
1417
+
1418
+
#[cfg(all(
1419
+
feature = "32-column-tables",
1420
+
feature = "64-column-tables",
1421
+
not(feature = "128-column-tables")
1422
+
))]
1423
+
#[macro_export]
1424
+
#[doc(hidden)]
1425
+
macro_rules! __diesel_error_table_size {
1426
+
() => {
1427
+
compile_error!(
1428
+
"Table contains more than 64 columns. Consider enabling the `128-column-tables` feature to enable diesels support for tables with more than 64 columns."
1429
+
);
1430
+
1431
+
}
1432
+
}
1433
+
1434
+
1435
+
#[cfg(all(
1436
+
feature = "32-column-tables",
1437
+
feature = "64-column-tables",
1438
+
feature = "128-column-tables"
1439
+
))]
1440
+
#[macro_export]
1441
+
#[doc(hidden)]
1442
+
macro_rules! __diesel_error_table_size {
1443
+
() => {
1444
+
compile_error!(
1445
+
"You reached the end. Diesel does not support tables with more than 128 columns. Consider using less columns."
1446
+
);
1447
+
}
1448
+
}
1449
+
1450
+
1451
+
1452
+
1327
1453
// The order of these modules is important (at least for those which have tests).
1328
1454
// Utility macros which don't call any others need to come first.
error: Table contains more than 16 columns. Consider enabling the `32-column-tables` feature to enable diesels support for tables with more than 16 columns.
0 commit comments