mirror of
				https://github.com/TheAnachronism/docspell.git
				synced 2025-10-30 21:40:12 +00:00 
			
		
		
		
	Make sure DML statements use the correct logger
It also seems to be necessary now to add the space in the `WHERE`. Normally, the `fr` interpolator would add spaces….
This commit is contained in:
		| @@ -8,19 +8,20 @@ package docspell.store.qb | ||||
|  | ||||
| import cats.data.{NonEmptyList => Nel} | ||||
|  | ||||
| import docspell.store.impl.DoobieMeta | ||||
| import docspell.store.qb.impl._ | ||||
|  | ||||
| import doobie._ | ||||
| import doobie.implicits._ | ||||
|  | ||||
| object DML { | ||||
| object DML extends DoobieMeta { | ||||
|   private val comma = fr"," | ||||
|  | ||||
|   def delete(table: TableDef, cond: Condition): ConnectionIO[Int] = | ||||
|     deleteFragment(table, cond).update.run | ||||
|  | ||||
|   def deleteFragment(table: TableDef, cond: Condition): Fragment = | ||||
|     fr"DELETE FROM" ++ FromExprBuilder.buildTable(table) ++ fr"WHERE" ++ ConditionBuilder | ||||
|     fr"DELETE FROM" ++ FromExprBuilder.buildTable(table) ++ fr" WHERE" ++ ConditionBuilder | ||||
|       .build(cond) | ||||
|  | ||||
|   def insert(table: TableDef, cols: Nel[Column[_]], values: Fragment): ConnectionIO[Int] = | ||||
|   | ||||
		Reference in New Issue
	
	Block a user