Commit Graph

13 Commits

Author SHA1 Message Date
Deluan Quintão 0ca0d5da22
Replace beego/orm with dbx (#2693)
* Start migration to dbx package

* Fix annotations and bookmarks bindings

* Fix tests

* Fix more tests

* Remove remaining references to beego/orm

* Add PostScanner/PostMapper interfaces

* Fix importing SmartPlaylists

* Renaming

* More renaming

* Fix artist DB mapping

* Fix playlist updates

* Remove bookmarks at the end of the test

* Remove remaining `orm` struct tags

* Fix user timestamps DB access

* Fix smart playlist evaluated_at DB access

* Fix search3
2023-12-09 13:52:17 -05:00
Zane van Iperen feb774a149
Change genre.Put() to upsert. Fix #1918 and #1564 (#1920)
* persistence/genre: change Put() to upsert

Absolutely disgusting hack to work around [1]. Try to insert the genre,
but if it conflicts, ignore it and update the genre with the existing
ID.

[1]: https://github.com/navidrome/navidrome/issues/1918.

* scanner: remove cached genre repository

Not needed anytmore. And remember:

  "Many Small Queries Are Efficient In SQLite" [1].

[1]: https://www.sqlite.org/np1queryprob.html

* Revert "scanner: remove cached genre repository"

This reverts commit c5d900aa43.

* Use squirrel to build SQL, to reduce risk of SQL injection

Co-authored-by: Deluan <deluan@navidrome.org>
2023-01-17 21:04:18 -05:00
Deluan 695f82a1a0 Upgrade to Beego 2's orm 2022-07-30 12:43:48 -04:00
Deluan 31882abf6f Upgrade Ginkgo to V2 2022-07-26 16:53:17 -04:00
Deluan 5e54925520 Add multiple genres to Albums 2021-07-20 17:45:08 -04:00
Deluan 39da741a80 Add multiple genres to MediaFile 2021-07-20 17:45:08 -04:00
Deluan 6ee45a9ccc Move project to Navidrome GitHub organization 2021-02-06 21:46:35 -05:00
Deluan 03c3c192ed Fixing static checks about passing nil context 2020-04-26 15:07:36 -04:00
Deluan f5071d1614 refactor: adding back artist and album tables 2020-02-01 17:23:03 -05:00
Deluan 71c1844bca refactor: new persistence, more SQL, less ORM 2020-02-01 17:23:03 -05:00
Deluan bee55c04c8 Rename project to Navidrome 2020-01-23 19:44:08 -05:00
Deluan 67eeb218c4 Big Refactor:
- Create model.DataStore, with provision for transactions
- Change all layers dependencies on repositories to use DataStore
- Implemented persistence.SQLStore
- Removed iTunes Bridge/Importer support
2020-01-19 16:28:09 -05:00
Deluan 36d93774bc Add GetGenre endpoint 2020-01-15 17:56:02 -05:00