Commit Graph

37 Commits

Author SHA1 Message Date
Jordan Petridis
e4d77a6ba4
Cleanup the id() method mess of the diesel models. 2018-01-13 07:46:56 +02:00
Jordan Petridis
e727734443
DB Schema: Remove episode.published_date column. 2017-12-30 22:23:10 +02:00
Jordan Petridis
036292284d
hammond-data: Do not clean source url's cause some feeds use queries as identifiers for some reason. 2017-12-29 20:21:36 +02:00
Jordan Petridis
fde4bedce6
hammond-data::parser: Refactor Podcast tests. 2017-12-25 23:29:42 +02:00
Jordan Petridis
4512790f2d
hammond-data: Add duration column to the episode table. 2017-12-22 17:30:07 +02:00
Jordan Petridis
b820ee4db7
hammond-data::parser : Do not clean image urls cause feeds put redirects for uri for some reason. 2017-12-22 14:51:57 +02:00
Jordan Petridis
d8281c70a5
Better naming of a dbquery function. 2017-12-10 06:11:03 +02:00
Jordan Petridis
bc57c33491
Change episode table schema. 2017-12-09 17:38:46 +02:00
Jordan Petridis
8e6cc4d2f2
Remove custom builders in favor of derive_builder crate. 2017-12-05 09:10:02 +02:00
Jordan Petridis
cb65782829
Extended the NewModel builder and added a bunch of unit tests. 2017-11-27 04:32:21 +02:00
Jordan Petridis
ee4f08c5cf
Implemented a BuildPattern for NewModels. Swiched stuff to pub(crate).
Added a Constructor for NewModels in order to make their fields private.
Also added getter methods that are mainly used in Unit tests.
2017-11-26 23:30:56 +02:00
Jordan Petridis
9d0df9de46
Tweak cargo privacy settings. 2017-11-26 06:21:14 +02:00
Jordan Petridis
6336f7cac1
Moved update funtions into a Trait and impl for NewModels. 2017-11-26 00:56:38 +02:00
Jordan Petridis
39dff5e27a
Moved insert functions into an Insert trait and implemented it for each NewModel. 2017-11-26 00:40:03 +02:00
Jordan Petridis
ce3a76aee1
Update episode rows instead of replacing them. 2017-11-26 00:13:51 +02:00
Jordan Petridis
2f801043c1
In place update a podcast row instead of replace. 2017-11-25 18:22:56 +02:00
Jordan Petridis
f83f894e44
Replaced pool.get().unwrap() statements with get()?. 2017-11-25 03:29:06 +02:00
Jordan Petridis
62da8bbb52
Use source_id as the unique identifieble field for the podcast table. 2017-11-25 01:56:10 +02:00
Jordan Petridis
5570fdd118
Switched to using r2d2 instead of a databaseConnection object. 2017-11-23 21:09:50 +02:00
Jordan Petridis
aa7c493e81
hammond-data/src/feed.rs api changes. 2017-11-23 18:48:41 +02:00
Jordan Petridis
3bcb23b39a
Redefine NewModels to hold Option<String> instead of Option<&str>. 2017-11-22 09:53:52 +02:00
Jordan Petridis
31328355b1
Methods renaming, Api changes. 2017-11-22 06:25:34 +02:00
Jordan Petridis
9bc6df2cba
Made Disel NewModels private. 2017-11-22 05:50:25 +02:00
Jordan Petridis
7be0b5bbf8
Added a url cleanr. Closes #4. 2017-11-20 22:06:29 +02:00
Jordan Petridis
5890fe2bb4
Moved all diesel queries into hammond-data/src/dbquerries.rs module. 2017-11-20 20:05:00 +02:00
Jordan Petridis
0ce4107be4
Revert back to using an Arc<Mutex<Connection>> instead of the pool. 2017-11-20 18:09:53 +02:00
Jordan Petridis
ce29602431
I hate everything. 2017-11-20 16:57:27 +02:00
Jordan Petridis
beaeeffba8
Refactored dbquerries.
Refactored so dbquerries.rs module *should* be the only piece of code
that interacts with a Database connection. Insert stuff will be moved too.
2017-11-19 23:08:36 +02:00
Jordan Petridis
47b32ac000
Removed the Database type alias. 2017-11-19 22:39:51 +02:00
Jordan Petridis
55442529a8
Initial switch to using r2d2. 2017-11-19 22:06:10 +02:00
Jordan Petridis
563f249a48
Reverted index_channel items to the synchronous version.
Using a transaction yields ~1/3 better performance as of now.
2017-11-18 19:57:50 +02:00
Jordan Petridis
1ec4370c7b
Moved Database type-alias into hammond-data/src/lib.rs. 2017-11-17 21:37:55 +02:00
Jordan Petridis
e66a337468
Moved indexing episode into a NewEpisode method.
There is a performance reggresion caused by the introduction of
Arc<Mutex<Connection>> instead of Connection that should be refactored.

Also removed the db transcaction as it was incomplete.
2017-11-17 20:01:59 +02:00
Jordan Petridis
282a29e7dd
Move some indexing functions into methods of insertable models. 2017-11-17 18:58:44 +02:00
Jordan Petridis
8eca46871d
Moved insert_return functions into methods of insertable models. 2017-11-17 18:10:29 +02:00
Jordan Petridis
54a0f17588
Initial draft of hammond-data/src/index_feed.rs API redesign. 2017-11-17 13:26:39 +02:00
Jordan Petridis
cfb876e006
Split hammond-data/models into sub modules. 2017-11-15 17:42:22 +02:00