diff options
author | Bryan Newbold <bnewbold@robocracy.org> | 2018-05-15 20:53:56 -0700 |
---|---|---|
committer | Bryan Newbold <bnewbold@robocracy.org> | 2018-05-15 20:53:58 -0700 |
commit | 9036469324912eae3eed8cb8645f91f1a68c5857 (patch) | |
tree | fc67a9b379b85f5019fad167eba759c6039d8ea3 /rust/src/database_models.rs | |
parent | cdb87fd0880664d20ee40ce367fe6a2f3559ed7c (diff) | |
download | fatcat-9036469324912eae3eed8cb8645f91f1a68c5857.tar.gz fatcat-9036469324912eae3eed8cb8645f91f1a68c5857.zip |
progress on inserts
Using a huge sql_query() to do raw multi-table inserts for now.
Diffstat (limited to 'rust/src/database_models.rs')
-rw-r--r-- | rust/src/database_models.rs | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/rust/src/database_models.rs b/rust/src/database_models.rs index 6c899ccf..e95e5980 100644 --- a/rust/src/database_models.rs +++ b/rust/src/database_models.rs @@ -1,9 +1,7 @@ use chrono; -use serde_json; +//use serde_json; use uuid::Uuid; -//use diesel::prelude::*; - use database_schema::*; // Ugh. I thought the whole point was to *not* do this, but: @@ -13,7 +11,7 @@ use database_schema::*; macro_rules! entity_structs { ($edit_table:expr, $edit_struct:ident, $ident_table:expr, $ident_struct:ident) => ( - #[derive(Debug, Queryable, Identifiable, Associations, AsChangeset)] + #[derive(Debug, Queryable, Identifiable, Associations, AsChangeset, QueryableByName)] #[table_name = $edit_table] pub struct $edit_struct { pub id: i64, |