1 /*
2  *  Make.org Core API
3  *  Copyright (C) 2018 Make.org
4  *
5  * This program is free software: you can redistribute it and/or modify
6  *  it under the terms of the GNU Affero General Public License as
7  *  published by the Free Software Foundation, either version 3 of the
8  *  License, or (at your option) any later version.
9  *
10  *  This program is distributed in the hope that it will be useful,
11  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13  *  GNU Affero General Public License for more details.
14  *
15  *  You should have received a copy of the GNU Affero General Public License
16  *  along with this program.  If not, see <https://www.gnu.org/licenses/>.
17  *
18  */
19 
20 package org.make.api.question
21 
22 import java.time.ZonedDateTime
23 import cats.implicits._
24 import cats.data.NonEmptyList
25 import eu.timepit.refined.api.Refined
26 import eu.timepit.refined.collection._
27 import grizzled.slf4j.Logging
28 import scalikejdbc._
29 import org.make.api.extensions.MakeDBExecutionContextComponent
30 import org.make.api.question.DefaultPersistentQuestionServiceComponent.PersistentQuestion
31 import org.make.api.technical.ScalikeSupport._
32 import org.make.api.technical.DatabaseTransactions.RichDatabase
33 import org.make.api.technical.PersistentServiceUtils.sortOrderQuery
34 import org.make.api.technical.{PersistentCompanion, ShortenedNames}
35 import org.make.core.DateHelper
36 import org.make.core.technical.Multilingual, Multilingual._
37 import org.make.core.operation.OperationId
38 import org.make.core.question.{Question, QuestionId}
39 import org.make.core.reference.{Country, Language}
40 
41 import scala.concurrent.Future
42 
43 trait DefaultPersistentQuestionServiceComponent extends PersistentQuestionServiceComponent {
44   this: MakeDBExecutionContextComponent =>
45 
46   lazy val persistentQuestionService: PersistentQuestionService = new DefaultPersistentQuestionService
47 
48   class DefaultPersistentQuestionService extends PersistentQuestionService with ShortenedNames with Logging {
49 
50     private val column = PersistentQuestion.column
51     private val questionAlias = PersistentQuestion.alias
52 
53     override def find(request: SearchQuestionRequest): Future[Seq[Question]] = {
54 
55       implicit val context: EC = readExecutionContext
56       Future(NamedDB("READ").retryableTx { implicit session =>
57         withSQL {
58           val query: scalikejdbc.ConditionSQLBuilder[PersistentQuestion] = select
59             .from(PersistentQuestion.as(questionAlias))
60             .where(
61               sqls.toAndConditionOpt(
62                 request.country.map(country => sqls.like(questionAlias.countries, s"%${country.value}%")),
63                 request.language
64                   .map(language => sqls.isNotNull(sqls"array_position(${questionAlias.languages}, ${language.value})")),
65                 request.maybeOperationIds
66                   .map(operationIds                      => sqls.in(questionAlias.operationId, operationIds.map(_.value))),
67                 request.maybeSlug.map(slug               => sqls.eq(questionAlias.slug, slug)),
68                 request.maybeQuestionIds.map(questionIds => sqls.in(questionAlias.questionId, questionIds.map(_.value)))
69               )
70             )
71           val offset = request.offset.orZero
72           val end = request.end
73           sortOrderQuery(offset, end, request.sort, request.order, query)
74         }.map(PersistentQuestion.apply()).list()
75       }).map(_.map(_.toQuestion))
76 
77     }
78 
79     override def count(request: SearchQuestionRequest): Future[Int] = {
80       implicit val context: EC = readExecutionContext
81       Future(NamedDB("READ").retryableTx { implicit session =>
82         withSQL {
83           select(sqls.count)
84             .from(PersistentQuestion.as(questionAlias))
85             .where(
86               sqls.toAndConditionOpt(
87                 request.country.map(country => sqls.like(questionAlias.countries, s"%${country.value}%")),
88                 request.language
89                   .map(language => sqls.isNotNull(sqls"array_position(${questionAlias.languages}, ${language.value})")),
90                 request.maybeOperationIds
91                   .map(operationIds                      => sqls.in(questionAlias.operationId, operationIds.map(_.value))),
92                 request.maybeQuestionIds.map(questionIds => sqls.in(questionAlias.questionId, questionIds.map(_.value)))
93               )
94             )
95         }.map(_.int(1)).single().getOrElse(0)
96       })
97     }
98 
99     override def getById(questionId: QuestionId): Future[Option[Question]] = {
100       implicit val context: EC = readExecutionContext
101       Future(NamedDB("READ").retryableTx { implicit session =>
102         withSQL {
103           select
104             .from(PersistentQuestion.as(questionAlias))
105             .where(sqls.eq(questionAlias.questionId, questionId.value))
106         }.map(PersistentQuestion.apply()).single()
107       }).map(_.map(_.toQuestion))
108     }
109 
110     override def getByQuestionIdValueOrSlug(questionIdValueOrSlug: String): Future[Option[Question]] = {
111       implicit val context: EC = readExecutionContext
112       Future(NamedDB("READ").retryableTx { implicit session =>
113         withSQL {
114           select
115             .from(PersistentQuestion.as(questionAlias))
116             .where(
117               sqls
118                 .eq(questionAlias.slug, questionIdValueOrSlug)
119                 .or(sqls.eq(questionAlias.questionId, questionIdValueOrSlug))
120             )
121         }.map(PersistentQuestion.apply()).single()
122       }).map(_.map(_.toQuestion))
123     }
124 
125     override def getByIds(questionIds: Seq[QuestionId]): Future[Seq[Question]] = {
126       implicit val context: EC = readExecutionContext
127       Future(NamedDB("READ").retryableTx { implicit session =>
128         withSQL {
129           select
130             .from(PersistentQuestion.as(questionAlias))
131             .where(sqls.in(questionAlias.questionId, questionIds.map(_.value)))
132         }.map(PersistentQuestion.apply()).list()
133       }).map(_.map(_.toQuestion))
134     }
135 
136     override def persist(question: Question): Future[Question] = {
137       implicit val context: EC = writeExecutionContext
138       Future(NamedDB("WRITE").retryableTx { implicit session =>
139         withSQL {
140           val now = DateHelper.now()
141           insert
142             .into(PersistentQuestion)
143             .namedValues(
144               column.questionId -> question.questionId.value,
145               column.slug -> question.slug,
146               column.createdAt -> now,
147               column.questions -> question.questions,
148               column.countries -> question.countries.toList.mkString(","),
149               column.defaultLanguage -> question.defaultLanguage.value,
150               column.languages -> session.connection
151                 .createArrayOf("VARCHAR", question.languages.map(_.value).toList.toArray),
152               column.shortTitles -> question.shortTitles,
153               column.operationId -> question.operationId.map(_.value),
154               column.updatedAt -> now
155             )
156         }.execute()
157       }).as(question)
158     }
159 
160     override def modify(question: Question): Future[Question] = {
161       implicit val context: EC = writeExecutionContext
162       Future(NamedDB("WRITE").retryableTx { implicit session =>
163         withSQL {
164           val now = DateHelper.now()
165           update(PersistentQuestion)
166             .set(
167               PersistentQuestion.column.countries -> question.countries.toList.mkString(","),
168               PersistentQuestion.column.defaultLanguage -> question.defaultLanguage.value,
169               PersistentQuestion.column.languages -> session.connection
170                 .createArrayOf("VARCHAR", question.languages.map(_.value).toList.toArray),
171               PersistentQuestion.column.questions -> question.questions,
172               PersistentQuestion.column.slug -> question.slug,
173               PersistentQuestion.column.shortTitles -> question.shortTitles,
174               PersistentQuestion.column.operationId -> question.operationId.map(_.value),
175               PersistentQuestion.column.updatedAt -> now
176             )
177             .where(sqls.eq(PersistentQuestion.column.questionId, question.questionId.value))
178         }.execute()
179       }).as(question)
180     }
181 
182     override def delete(questionId: QuestionId): Future[Unit] = {
183       implicit val context: EC = readExecutionContext
184       Future(NamedDB("WRITE").retryableTx { implicit session =>
185         withSQL {
186           deleteFrom(PersistentQuestion)
187             .where(sqls.eq(PersistentQuestion.column.questionId, questionId.value))
188         }.execute()
189       }).void
190     }
191   }
192 }
193 
194 object DefaultPersistentQuestionServiceComponent {
195 
196   @SuppressWarnings(Array("org.wartremover.warts.ArrayEquals"))
197   final case class PersistentQuestion(
198     questionId: String,
199     countries: String,
200     defaultLanguage: String,
201     languages: Array[String],
202     questions: Multilingual[String Refined NonEmpty],
203     shortTitles: Option[Multilingual[String Refined NonEmpty]],
204     slug: String,
205     createdAt: ZonedDateTime,
206     updatedAt: ZonedDateTime,
207     operationId: Option[String]
208   ) {
209 
210     def toQuestion: Question = {
211       Question(
212         questionId = QuestionId(this.questionId),
213         slug = this.slug,
214         countries = NonEmptyList.fromListUnsafe(countries.split(',').map(Country(_)).toList),
215         defaultLanguage = Language(defaultLanguage),
216         languages = NonEmptyList.fromListUnsafe(languages.toList.map(Language.apply)),
217         questions = this.questions,
218         shortTitles = this.shortTitles,
219         operationId = this.operationId.map(OperationId(_))
220       )
221     }
222   }
223 
224   implicit object PersistentQuestion
225       extends PersistentCompanion[PersistentQuestion, Question]
226       with ShortenedNames
227       with Logging {
228 
229     override val columnNames: Seq[String] =
230       Seq(
231         "question_id",
232         "countries",
233         "default_language",
234         "languages",
235         "questions",
236         "created_at",
237         "updated_at",
238         "operation_id",
239         "slug",
240         "short_titles"
241       )
242     final val swaggerAllowableValues =
243       "question_id,countries,default_language,languages,questions,created_at,updated_at,operation_id,slug,short_titles"
244 
245     override val tableName: String = "question"
246 
247     override lazy val alias: SyntaxProvider[PersistentQuestion] = syntax("question")
248 
249     override lazy val defaultSortColumns: NonEmptyList[SQLSyntax] = NonEmptyList.of(alias.questionId)
250 
251     private lazy val resultName: ResultName[PersistentQuestion] = alias.resultName
252 
253     @SuppressWarnings(Array("org.wartremover.warts.AsInstanceOf"))
254     def apply(
255       questionResultName: ResultName[PersistentQuestion] = resultName
256     )(resultSet: WrappedResultSet): PersistentQuestion = {
257 
258       PersistentQuestion(
259         questionId = resultSet.string(questionResultName.questionId),
260         slug = resultSet.string(questionResultName.slug),
261         countries = resultSet.string(questionResultName.countries),
262         defaultLanguage = resultSet.get(questionResultName.defaultLanguage),
263         languages = resultSet
264           .arrayOpt(questionResultName.languages)
265           .map(_.getArray.asInstanceOf[Array[String]])
266           .getOrElse(Array()),
267         questions = resultSet.get(questionResultName.questions),
268         shortTitles = resultSet.get(questionResultName.shortTitles),
269         createdAt = resultSet.zonedDateTime(questionResultName.createdAt),
270         updatedAt = resultSet.zonedDateTime(questionResultName.updatedAt),
271         operationId = resultSet.stringOpt(questionResultName.operationId)
272       )
273     }
274   }
275 }
Line Stmt Id Pos Tree Symbol Tests Code
50 21280 2038 - 2063 Select scalikejdbc.SQLSyntaxSupportFeature.SQLSyntaxSupport.column org.make.api.question.DefaultPersistentQuestionServiceComponent.PersistentQuestion.column
55 20819 2237 - 2257 Select org.make.api.extensions.MakeDBExecutionContextComponent.readExecutionContext org.scalatest.testsuite DefaultPersistentQuestionServiceComponent.this.readExecutionContext
75 19798 2264 - 3442 ApplyToImplicitArgs scala.concurrent.Future.map org.scalatest.testsuite scala.concurrent.Future.apply[List[org.make.api.question.DefaultPersistentQuestionServiceComponent.PersistentQuestion]]({ <artifact> val qual$1: org.make.api.technical.DatabaseTransactions.RichDatabase = org.make.api.technical.DatabaseTransactions.RichDatabase({ <artifact> val x$1: String("READ") = "READ"; <artifact> val x$2: scalikejdbc.SettingsProvider = scalikejdbc.NamedDB.apply$default$2; <artifact> val x$3: scalikejdbc.ConnectionPoolContext = scalikejdbc.NamedDB.apply$default$3("READ", x$2); scalikejdbc.NamedDB.apply("READ", x$2)(x$3) }); <artifact> val x$7: scalikejdbc.DBSession => List[org.make.api.question.DefaultPersistentQuestionServiceComponent.PersistentQuestion] @scala.reflect.internal.annotations.uncheckedBounds = ((implicit session: scalikejdbc.DBSession) => { <synthetic> <stable> <artifact> val stabilizer$1: scalikejdbc.SQLToList[org.make.api.question.DefaultPersistentQuestionServiceComponent.PersistentQuestion,scalikejdbc.HasExtractor] @scala.reflect.internal.annotations.uncheckedBounds = scalikejdbc.`package`.withSQL.apply[org.make.api.question.DefaultPersistentQuestionServiceComponent.PersistentQuestion]({ val query: scalikejdbc.ConditionSQLBuilder[org.make.api.question.DefaultPersistentQuestionServiceComponent.PersistentQuestion] = scalikejdbc.`package`.select.from[org.make.api.question.DefaultPersistentQuestionServiceComponent.PersistentQuestion](org.make.api.question.DefaultPersistentQuestionServiceComponent.PersistentQuestion.as(DefaultPersistentQuestionService.this.questionAlias)).where(scalikejdbc.`package`.sqls.toAndConditionOpt(request.country.map[scalikejdbc.interpolation.SQLSyntax](((country: org.make.core.reference.Country) => scalikejdbc.`package`.sqls.like((DefaultPersistentQuestionService.this.questionAlias.field("countries"): scalikejdbc.interpolation.SQLSyntax), ("%".+(country.value).+("%"): String)))), request.language.map[scalikejdbc.interpolation.SQLSyntax](((language: org.make.core.reference.Language) => scalikejdbc.`package`.sqls.isNotNull(scalikejdbc.`package`.scalikejdbcSQLInterpolationImplicitDef(scala.StringContext.apply("array_position(", ", ", ")")).sqls((DefaultPersistentQuestionService.this.questionAlias.field("languages"): scalikejdbc.interpolation.SQLSyntax), language.value)))), request.maybeOperationIds.map[scalikejdbc.interpolation.SQLSyntax](((operationIds: Seq[org.make.core.operation.OperationId]) => scalikejdbc.`package`.sqls.in[String]((DefaultPersistentQuestionService.this.questionAlias.field("operationId"): scalikejdbc.interpolation.SQLSyntax), operationIds.map[String](((x$1: org.make.core.operation.OperationId) => x$1.value)))(scalikejdbc.this.ParameterBinderFactory.stringParameterBinderFactory))), request.maybeSlug.map[scalikejdbc.interpolation.SQLSyntax](((slug: String) => scalikejdbc.`package`.sqls.eq[String]((DefaultPersistentQuestionService.this.questionAlias.field("slug"): scalikejdbc.interpolation.SQLSyntax), slug)(scalikejdbc.this.ParameterBinderFactory.stringParameterBinderFactory))), request.maybeQuestionIds.map[scalikejdbc.interpolation.SQLSyntax](((questionIds: Seq[org.make.core.question.QuestionId]) => scalikejdbc.`package`.sqls.in[String]((DefaultPersistentQuestionService.this.questionAlias.field("questionId"): scalikejdbc.interpolation.SQLSyntax), questionIds.map[String](((x$2: org.make.core.question.QuestionId) => x$2.value)))(scalikejdbc.this.ParameterBinderFactory.stringParameterBinderFactory))))); val offset: org.make.core.technical.Pagination.Offset = technical.this.Pagination.RichOptionOffset(request.offset).orZero; val end: Option[org.make.core.technical.Pagination.End] = request.end; org.make.api.technical.PersistentServiceUtils.sortOrderQuery[org.make.api.question.DefaultPersistentQuestionServiceComponent.PersistentQuestion, org.make.core.question.Question](offset, end, request.sort, request.order, query)(org.make.api.question.DefaultPersistentQuestionServiceComponent.PersistentQuestion) }).map[org.make.api.question.DefaultPersistentQuestionServiceComponent.PersistentQuestion]({ <synthetic> val eta$0$1: scalikejdbc.ResultName[org.make.api.question.DefaultPersistentQuestionServiceComponent.PersistentQuestion] = org.make.api.question.DefaultPersistentQuestionServiceComponent.PersistentQuestion.apply$default$1; ((resultSet: scalikejdbc.WrappedResultSet) => org.make.api.question.DefaultPersistentQuestionServiceComponent.PersistentQuestion.apply(eta$0$1)(resultSet)) }).list; { <artifact> val x$4: scalikejdbc.DBSession = session; <artifact> val x$5: scalikejdbc.SQL[org.make.api.question.DefaultPersistentQuestionServiceComponent.PersistentQuestion,scalikejdbc.HasExtractor] =:= scalikejdbc.SQL[org.make.api.question.DefaultPersistentQuestionServiceComponent.PersistentQuestion,scalikejdbc.HasExtractor] @scala.reflect.internal.annotations.uncheckedBounds = GeneralizedTypeConstraintsForWithExtractor.this.=:=.tpEquals[scalikejdbc.SQL[org.make.api.question.DefaultPersistentQuestionServiceComponent.PersistentQuestion,scalikejdbc.HasExtractor]]; <artifact> val x$6: scalikejdbc.ConnectionPoolContext = stabilizer$1.apply$default$2(); stabilizer$1.apply()(x$4, x$6, x$5) } }); <artifact> val x$8: scalikejdbc.TxBoundary[List[org.make.api.question.DefaultPersistentQuestionServiceComponent.PersistentQuestion]] @scala.reflect.internal.annotations.uncheckedBounds = qual$1.retryableTx$default$2[List[org.make.api.question.DefaultPersistentQuestionServiceComponent.PersistentQuestion]](x$7); qual$1.retryableTx[List[org.make.api.question.DefaultPersistentQuestionServiceComponent.PersistentQuestion]](x$7)(x$8) })(context).map[List[org.make.core.question.Question]](((x$3: List[org.make.api.question.DefaultPersistentQuestionServiceComponent.PersistentQuestion]) => x$3.map[org.make.core.question.Question](((x$4: org.make.api.question.DefaultPersistentQuestionServiceComponent.PersistentQuestion) => x$4.toQuestion))))(context)
80 21438 3556 - 3576 Select org.make.api.extensions.MakeDBExecutionContextComponent.readExecutionContext DefaultPersistentQuestionServiceComponent.this.readExecutionContext
81 20573 3583 - 4433 ApplyToImplicitArgs scala.concurrent.Future.apply scala.concurrent.Future.apply[Int]({ <artifact> val qual$1: org.make.api.technical.DatabaseTransactions.RichDatabase = org.make.api.technical.DatabaseTransactions.RichDatabase({ <artifact> val x$1: String("READ") = "READ"; <artifact> val x$2: scalikejdbc.SettingsProvider = scalikejdbc.NamedDB.apply$default$2; <artifact> val x$3: scalikejdbc.ConnectionPoolContext = scalikejdbc.NamedDB.apply$default$3("READ", x$2); scalikejdbc.NamedDB.apply("READ", x$2)(x$3) }); <artifact> val x$7: scalikejdbc.DBSession => Int @scala.reflect.internal.annotations.uncheckedBounds = ((implicit session: scalikejdbc.DBSession) => { <synthetic> <stable> <artifact> val stabilizer$1: scalikejdbc.SQLToOption[Int,scalikejdbc.HasExtractor] @scala.reflect.internal.annotations.uncheckedBounds = scalikejdbc.`package`.withSQL.apply[Nothing](scalikejdbc.`package`.select.apply[Nothing](scalikejdbc.`package`.sqls.count).from(org.make.api.question.DefaultPersistentQuestionServiceComponent.PersistentQuestion.as(DefaultPersistentQuestionService.this.questionAlias)).where(scalikejdbc.`package`.sqls.toAndConditionOpt(request.country.map[scalikejdbc.interpolation.SQLSyntax](((country: org.make.core.reference.Country) => scalikejdbc.`package`.sqls.like((DefaultPersistentQuestionService.this.questionAlias.field("countries"): scalikejdbc.interpolation.SQLSyntax), ("%".+(country.value).+("%"): String)))), request.language.map[scalikejdbc.interpolation.SQLSyntax](((language: org.make.core.reference.Language) => scalikejdbc.`package`.sqls.isNotNull(scalikejdbc.`package`.scalikejdbcSQLInterpolationImplicitDef(scala.StringContext.apply("array_position(", ", ", ")")).sqls((DefaultPersistentQuestionService.this.questionAlias.field("languages"): scalikejdbc.interpolation.SQLSyntax), language.value)))), request.maybeOperationIds.map[scalikejdbc.interpolation.SQLSyntax](((operationIds: Seq[org.make.core.operation.OperationId]) => scalikejdbc.`package`.sqls.in[String]((DefaultPersistentQuestionService.this.questionAlias.field("operationId"): scalikejdbc.interpolation.SQLSyntax), operationIds.map[String](((x$5: org.make.core.operation.OperationId) => x$5.value)))(scalikejdbc.this.ParameterBinderFactory.stringParameterBinderFactory))), request.maybeQuestionIds.map[scalikejdbc.interpolation.SQLSyntax](((questionIds: Seq[org.make.core.question.QuestionId]) => scalikejdbc.`package`.sqls.in[String]((DefaultPersistentQuestionService.this.questionAlias.field("questionId"): scalikejdbc.interpolation.SQLSyntax), questionIds.map[String](((x$6: org.make.core.question.QuestionId) => x$6.value)))(scalikejdbc.this.ParameterBinderFactory.stringParameterBinderFactory)))))).map[Int](((x$7: scalikejdbc.WrappedResultSet) => x$7.int(1))).single; { <artifact> val x$4: scalikejdbc.DBSession = session; <artifact> val x$5: scalikejdbc.SQL[Int,scalikejdbc.HasExtractor] =:= scalikejdbc.SQL[Int,scalikejdbc.HasExtractor] @scala.reflect.internal.annotations.uncheckedBounds = GeneralizedTypeConstraintsForWithExtractor.this.=:=.tpEquals[scalikejdbc.SQL[Int,scalikejdbc.HasExtractor]]; <artifact> val x$6: scalikejdbc.ConnectionPoolContext = stabilizer$1.apply$default$2(); stabilizer$1.apply()(x$4, x$6, x$5) }.getOrElse[Int](0) }); <artifact> val x$8: scalikejdbc.TxBoundary[Int] @scala.reflect.internal.annotations.uncheckedBounds = qual$1.retryableTx$default$2[Int](x$7); qual$1.retryableTx[Int](x$7)(x$8) })(context)
100 19543 4553 - 4573 Select org.make.api.extensions.MakeDBExecutionContextComponent.readExecutionContext org.scalatest.testsuite DefaultPersistentQuestionServiceComponent.this.readExecutionContext
107 21637 4580 - 4884 ApplyToImplicitArgs scala.concurrent.Future.map org.scalatest.testsuite scala.concurrent.Future.apply[Option[org.make.api.question.DefaultPersistentQuestionServiceComponent.PersistentQuestion]]({ <artifact> val qual$1: org.make.api.technical.DatabaseTransactions.RichDatabase = org.make.api.technical.DatabaseTransactions.RichDatabase({ <artifact> val x$1: String("READ") = "READ"; <artifact> val x$2: scalikejdbc.SettingsProvider = scalikejdbc.NamedDB.apply$default$2; <artifact> val x$3: scalikejdbc.ConnectionPoolContext = scalikejdbc.NamedDB.apply$default$3("READ", x$2); scalikejdbc.NamedDB.apply("READ", x$2)(x$3) }); <artifact> val x$7: scalikejdbc.DBSession => Option[org.make.api.question.DefaultPersistentQuestionServiceComponent.PersistentQuestion] @scala.reflect.internal.annotations.uncheckedBounds = ((implicit session: scalikejdbc.DBSession) => { <synthetic> <stable> <artifact> val stabilizer$1: scalikejdbc.SQLToOption[org.make.api.question.DefaultPersistentQuestionServiceComponent.PersistentQuestion,scalikejdbc.HasExtractor] @scala.reflect.internal.annotations.uncheckedBounds = scalikejdbc.`package`.withSQL.apply[Nothing](scalikejdbc.`package`.select.from[Nothing](org.make.api.question.DefaultPersistentQuestionServiceComponent.PersistentQuestion.as(DefaultPersistentQuestionService.this.questionAlias)).where(scalikejdbc.`package`.sqls.eq[String]((DefaultPersistentQuestionService.this.questionAlias.field("questionId"): scalikejdbc.interpolation.SQLSyntax), questionId.value)(scalikejdbc.this.ParameterBinderFactory.stringParameterBinderFactory))).map[org.make.api.question.DefaultPersistentQuestionServiceComponent.PersistentQuestion]({ <synthetic> val eta$0$1: scalikejdbc.ResultName[org.make.api.question.DefaultPersistentQuestionServiceComponent.PersistentQuestion] = org.make.api.question.DefaultPersistentQuestionServiceComponent.PersistentQuestion.apply$default$1; ((resultSet: scalikejdbc.WrappedResultSet) => org.make.api.question.DefaultPersistentQuestionServiceComponent.PersistentQuestion.apply(eta$0$1)(resultSet)) }).single; { <artifact> val x$4: scalikejdbc.DBSession = session; <artifact> val x$5: scalikejdbc.SQL[org.make.api.question.DefaultPersistentQuestionServiceComponent.PersistentQuestion,scalikejdbc.HasExtractor] =:= scalikejdbc.SQL[org.make.api.question.DefaultPersistentQuestionServiceComponent.PersistentQuestion,scalikejdbc.HasExtractor] @scala.reflect.internal.annotations.uncheckedBounds = GeneralizedTypeConstraintsForWithExtractor.this.=:=.tpEquals[scalikejdbc.SQL[org.make.api.question.DefaultPersistentQuestionServiceComponent.PersistentQuestion,scalikejdbc.HasExtractor]]; <artifact> val x$6: scalikejdbc.ConnectionPoolContext = stabilizer$1.apply$default$2(); stabilizer$1.apply()(x$4, x$6, x$5) } }); <artifact> val x$8: scalikejdbc.TxBoundary[Option[org.make.api.question.DefaultPersistentQuestionServiceComponent.PersistentQuestion]] @scala.reflect.internal.annotations.uncheckedBounds = qual$1.retryableTx$default$2[Option[org.make.api.question.DefaultPersistentQuestionServiceComponent.PersistentQuestion]](x$7); qual$1.retryableTx[Option[org.make.api.question.DefaultPersistentQuestionServiceComponent.PersistentQuestion]](x$7)(x$8) })(context).map[Option[org.make.core.question.Question]](((x$8: Option[org.make.api.question.DefaultPersistentQuestionServiceComponent.PersistentQuestion]) => x$8.map[org.make.core.question.Question](((x$9: org.make.api.question.DefaultPersistentQuestionServiceComponent.PersistentQuestion) => x$9.toQuestion))))(context)
111 20608 5030 - 5050 Select org.make.api.extensions.MakeDBExecutionContextComponent.readExecutionContext org.scalatest.testsuite DefaultPersistentQuestionServiceComponent.this.readExecutionContext
122 19672 5057 - 5483 ApplyToImplicitArgs scala.concurrent.Future.map org.scalatest.testsuite scala.concurrent.Future.apply[Option[org.make.api.question.DefaultPersistentQuestionServiceComponent.PersistentQuestion]]({ <artifact> val qual$1: org.make.api.technical.DatabaseTransactions.RichDatabase = org.make.api.technical.DatabaseTransactions.RichDatabase({ <artifact> val x$1: String("READ") = "READ"; <artifact> val x$2: scalikejdbc.SettingsProvider = scalikejdbc.NamedDB.apply$default$2; <artifact> val x$3: scalikejdbc.ConnectionPoolContext = scalikejdbc.NamedDB.apply$default$3("READ", x$2); scalikejdbc.NamedDB.apply("READ", x$2)(x$3) }); <artifact> val x$7: scalikejdbc.DBSession => Option[org.make.api.question.DefaultPersistentQuestionServiceComponent.PersistentQuestion] @scala.reflect.internal.annotations.uncheckedBounds = ((implicit session: scalikejdbc.DBSession) => { <synthetic> <stable> <artifact> val stabilizer$1: scalikejdbc.SQLToOption[org.make.api.question.DefaultPersistentQuestionServiceComponent.PersistentQuestion,scalikejdbc.HasExtractor] @scala.reflect.internal.annotations.uncheckedBounds = scalikejdbc.`package`.withSQL.apply[Nothing](scalikejdbc.`package`.select.from[Nothing](org.make.api.question.DefaultPersistentQuestionServiceComponent.PersistentQuestion.as(DefaultPersistentQuestionService.this.questionAlias)).where(scalikejdbc.`package`.sqls.eq[String]((DefaultPersistentQuestionService.this.questionAlias.field("slug"): scalikejdbc.interpolation.SQLSyntax), questionIdValueOrSlug)(scalikejdbc.this.ParameterBinderFactory.stringParameterBinderFactory).or(scalikejdbc.`package`.sqls.eq[String]((DefaultPersistentQuestionService.this.questionAlias.field("questionId"): scalikejdbc.interpolation.SQLSyntax), questionIdValueOrSlug)(scalikejdbc.this.ParameterBinderFactory.stringParameterBinderFactory)))).map[org.make.api.question.DefaultPersistentQuestionServiceComponent.PersistentQuestion]({ <synthetic> val eta$0$1: scalikejdbc.ResultName[org.make.api.question.DefaultPersistentQuestionServiceComponent.PersistentQuestion] = org.make.api.question.DefaultPersistentQuestionServiceComponent.PersistentQuestion.apply$default$1; ((resultSet: scalikejdbc.WrappedResultSet) => org.make.api.question.DefaultPersistentQuestionServiceComponent.PersistentQuestion.apply(eta$0$1)(resultSet)) }).single; { <artifact> val x$4: scalikejdbc.DBSession = session; <artifact> val x$5: scalikejdbc.SQL[org.make.api.question.DefaultPersistentQuestionServiceComponent.PersistentQuestion,scalikejdbc.HasExtractor] =:= scalikejdbc.SQL[org.make.api.question.DefaultPersistentQuestionServiceComponent.PersistentQuestion,scalikejdbc.HasExtractor] @scala.reflect.internal.annotations.uncheckedBounds = GeneralizedTypeConstraintsForWithExtractor.this.=:=.tpEquals[scalikejdbc.SQL[org.make.api.question.DefaultPersistentQuestionServiceComponent.PersistentQuestion,scalikejdbc.HasExtractor]]; <artifact> val x$6: scalikejdbc.ConnectionPoolContext = stabilizer$1.apply$default$2(); stabilizer$1.apply()(x$4, x$6, x$5) } }); <artifact> val x$8: scalikejdbc.TxBoundary[Option[org.make.api.question.DefaultPersistentQuestionServiceComponent.PersistentQuestion]] @scala.reflect.internal.annotations.uncheckedBounds = qual$1.retryableTx$default$2[Option[org.make.api.question.DefaultPersistentQuestionServiceComponent.PersistentQuestion]](x$7); qual$1.retryableTx[Option[org.make.api.question.DefaultPersistentQuestionServiceComponent.PersistentQuestion]](x$7)(x$8) })(context).map[Option[org.make.core.question.Question]](((x$10: Option[org.make.api.question.DefaultPersistentQuestionServiceComponent.PersistentQuestion]) => x$10.map[org.make.core.question.Question](((x$11: org.make.api.question.DefaultPersistentQuestionServiceComponent.PersistentQuestion) => x$11.toQuestion))))(context)
126 21287 5607 - 5627 Select org.make.api.extensions.MakeDBExecutionContextComponent.readExecutionContext DefaultPersistentQuestionServiceComponent.this.readExecutionContext
133 20777 5634 - 5944 ApplyToImplicitArgs scala.concurrent.Future.map scala.concurrent.Future.apply[List[org.make.api.question.DefaultPersistentQuestionServiceComponent.PersistentQuestion]]({ <artifact> val qual$1: org.make.api.technical.DatabaseTransactions.RichDatabase = org.make.api.technical.DatabaseTransactions.RichDatabase({ <artifact> val x$1: String("READ") = "READ"; <artifact> val x$2: scalikejdbc.SettingsProvider = scalikejdbc.NamedDB.apply$default$2; <artifact> val x$3: scalikejdbc.ConnectionPoolContext = scalikejdbc.NamedDB.apply$default$3("READ", x$2); scalikejdbc.NamedDB.apply("READ", x$2)(x$3) }); <artifact> val x$7: scalikejdbc.DBSession => List[org.make.api.question.DefaultPersistentQuestionServiceComponent.PersistentQuestion] @scala.reflect.internal.annotations.uncheckedBounds = ((implicit session: scalikejdbc.DBSession) => { <synthetic> <stable> <artifact> val stabilizer$1: scalikejdbc.SQLToList[org.make.api.question.DefaultPersistentQuestionServiceComponent.PersistentQuestion,scalikejdbc.HasExtractor] @scala.reflect.internal.annotations.uncheckedBounds = scalikejdbc.`package`.withSQL.apply[Nothing](scalikejdbc.`package`.select.from[Nothing](org.make.api.question.DefaultPersistentQuestionServiceComponent.PersistentQuestion.as(DefaultPersistentQuestionService.this.questionAlias)).where(scalikejdbc.`package`.sqls.in[String]((DefaultPersistentQuestionService.this.questionAlias.field("questionId"): scalikejdbc.interpolation.SQLSyntax), questionIds.map[String](((x$12: org.make.core.question.QuestionId) => x$12.value)))(scalikejdbc.this.ParameterBinderFactory.stringParameterBinderFactory))).map[org.make.api.question.DefaultPersistentQuestionServiceComponent.PersistentQuestion]({ <synthetic> val eta$0$1: scalikejdbc.ResultName[org.make.api.question.DefaultPersistentQuestionServiceComponent.PersistentQuestion] = org.make.api.question.DefaultPersistentQuestionServiceComponent.PersistentQuestion.apply$default$1; ((resultSet: scalikejdbc.WrappedResultSet) => org.make.api.question.DefaultPersistentQuestionServiceComponent.PersistentQuestion.apply(eta$0$1)(resultSet)) }).list; { <artifact> val x$4: scalikejdbc.DBSession = session; <artifact> val x$5: scalikejdbc.SQL[org.make.api.question.DefaultPersistentQuestionServiceComponent.PersistentQuestion,scalikejdbc.HasExtractor] =:= scalikejdbc.SQL[org.make.api.question.DefaultPersistentQuestionServiceComponent.PersistentQuestion,scalikejdbc.HasExtractor] @scala.reflect.internal.annotations.uncheckedBounds = GeneralizedTypeConstraintsForWithExtractor.this.=:=.tpEquals[scalikejdbc.SQL[org.make.api.question.DefaultPersistentQuestionServiceComponent.PersistentQuestion,scalikejdbc.HasExtractor]]; <artifact> val x$6: scalikejdbc.ConnectionPoolContext = stabilizer$1.apply$default$2(); stabilizer$1.apply()(x$4, x$6, x$5) } }); <artifact> val x$8: scalikejdbc.TxBoundary[List[org.make.api.question.DefaultPersistentQuestionServiceComponent.PersistentQuestion]] @scala.reflect.internal.annotations.uncheckedBounds = qual$1.retryableTx$default$2[List[org.make.api.question.DefaultPersistentQuestionServiceComponent.PersistentQuestion]](x$7); qual$1.retryableTx[List[org.make.api.question.DefaultPersistentQuestionServiceComponent.PersistentQuestion]](x$7)(x$8) })(context).map[List[org.make.core.question.Question]](((x$13: List[org.make.api.question.DefaultPersistentQuestionServiceComponent.PersistentQuestion]) => x$13.map[org.make.core.question.Question](((x$14: org.make.api.question.DefaultPersistentQuestionServiceComponent.PersistentQuestion) => x$14.toQuestion))))(context)
137 19804 6052 - 6073 Select org.make.api.extensions.MakeDBExecutionContextComponent.writeExecutionContext DefaultPersistentQuestionServiceComponent.this.writeExecutionContext
157 21408 6080 - 6986 Apply cats.Functor.Ops.as cats.implicits.toFunctorOps[scala.concurrent.Future, Boolean](scala.concurrent.Future.apply[Boolean]({ <artifact> val qual$1: org.make.api.technical.DatabaseTransactions.RichDatabase = org.make.api.technical.DatabaseTransactions.RichDatabase({ <artifact> val x$1: String("WRITE") = "WRITE"; <artifact> val x$2: scalikejdbc.SettingsProvider = scalikejdbc.NamedDB.apply$default$2; <artifact> val x$3: scalikejdbc.ConnectionPoolContext = scalikejdbc.NamedDB.apply$default$3("WRITE", x$2); scalikejdbc.NamedDB.apply("WRITE", x$2)(x$3) }); <artifact> val x$4: scalikejdbc.DBSession => Boolean @scala.reflect.internal.annotations.uncheckedBounds = ((implicit session: scalikejdbc.DBSession) => scalikejdbc.`package`.withSQL.apply[scalikejdbc.UpdateOperation]({ val now: java.time.ZonedDateTime = org.make.core.DateHelper.now(); scalikejdbc.`package`.insert.into(org.make.api.question.DefaultPersistentQuestionServiceComponent.PersistentQuestion).namedValues((DefaultPersistentQuestionService.this.column.field("questionId"): scalikejdbc.interpolation.SQLSyntax).->[String](question.questionId.value)(scalikejdbc.this.ParameterBinderFactory.stringParameterBinderFactory), (DefaultPersistentQuestionService.this.column.field("slug"): scalikejdbc.interpolation.SQLSyntax).->[String](question.slug)(scalikejdbc.this.ParameterBinderFactory.stringParameterBinderFactory), (DefaultPersistentQuestionService.this.column.field("createdAt"): scalikejdbc.interpolation.SQLSyntax).->[java.time.ZonedDateTime](now)(scalikejdbc.this.ParameterBinderFactory.javaTimeZonedDateTimeParameterBinderFactory), (DefaultPersistentQuestionService.this.column.field("questions"): scalikejdbc.interpolation.SQLSyntax).->[org.make.core.technical.Multilingual[eu.timepit.refined.api.Refined[String,eu.timepit.refined.collection.NonEmpty]]](question.questions)(org.make.core.technical.Multilingual.multilingualNonEmptyBinder), (DefaultPersistentQuestionService.this.column.field("countries"): scalikejdbc.interpolation.SQLSyntax).->[String](question.countries.toList.mkString(","))(scalikejdbc.this.ParameterBinderFactory.stringParameterBinderFactory), (DefaultPersistentQuestionService.this.column.field("defaultLanguage"): scalikejdbc.interpolation.SQLSyntax).->[String](question.defaultLanguage.value)(scalikejdbc.this.ParameterBinderFactory.stringParameterBinderFactory), (DefaultPersistentQuestionService.this.column.field("languages"): scalikejdbc.interpolation.SQLSyntax).->[java.sql.Array](session.connection.createArrayOf("VARCHAR", question.languages.map[String](((x$15: org.make.core.reference.Language) => x$15.value)).toList.toArray[Object]((ClassTag.apply[Object](classOf[java.lang.Object]): scala.reflect.ClassTag[Object]))))(scalikejdbc.this.ParameterBinderFactory.sqlArrayParameterBinderFactory), (DefaultPersistentQuestionService.this.column.field("shortTitles"): scalikejdbc.interpolation.SQLSyntax).->[Option[org.make.core.technical.Multilingual[eu.timepit.refined.api.Refined[String,eu.timepit.refined.collection.NonEmpty]]]](question.shortTitles)(org.make.core.technical.Multilingual.optMultilingualNonEmptyBinder), (DefaultPersistentQuestionService.this.column.field("operationId"): scalikejdbc.interpolation.SQLSyntax).->[Option[String]](question.operationId.map[String](((x$16: org.make.core.operation.OperationId) => x$16.value)))(scalikejdbc.this.ParameterBinderFactory.optionalParameterBinderFactory[String](scalikejdbc.this.ParameterBinderFactory.stringParameterBinderFactory)), (DefaultPersistentQuestionService.this.column.field("updatedAt"): scalikejdbc.interpolation.SQLSyntax).->[java.time.ZonedDateTime](now)(scalikejdbc.this.ParameterBinderFactory.javaTimeZonedDateTimeParameterBinderFactory)) }).execute.apply()(session)); <artifact> val x$5: scalikejdbc.TxBoundary[Boolean] @scala.reflect.internal.annotations.uncheckedBounds = qual$1.retryableTx$default$2[Boolean](x$4); qual$1.retryableTx[Boolean](x$4)(x$5) })(context))(cats.implicits.catsStdInstancesForFuture(context)).as[org.make.core.question.Question](question)
161 20555 7093 - 7114 Select org.make.api.extensions.MakeDBExecutionContextComponent.writeExecutionContext org.scalatest.testsuite DefaultPersistentQuestionServiceComponent.this.writeExecutionContext
179 19551 7121 - 8145 Apply cats.Functor.Ops.as org.scalatest.testsuite cats.implicits.toFunctorOps[scala.concurrent.Future, Boolean](scala.concurrent.Future.apply[Boolean]({ <artifact> val qual$1: org.make.api.technical.DatabaseTransactions.RichDatabase = org.make.api.technical.DatabaseTransactions.RichDatabase({ <artifact> val x$1: String("WRITE") = "WRITE"; <artifact> val x$2: scalikejdbc.SettingsProvider = scalikejdbc.NamedDB.apply$default$2; <artifact> val x$3: scalikejdbc.ConnectionPoolContext = scalikejdbc.NamedDB.apply$default$3("WRITE", x$2); scalikejdbc.NamedDB.apply("WRITE", x$2)(x$3) }); <artifact> val x$4: scalikejdbc.DBSession => Boolean @scala.reflect.internal.annotations.uncheckedBounds = ((implicit session: scalikejdbc.DBSession) => scalikejdbc.`package`.withSQL.apply[scalikejdbc.UpdateOperation]({ val now: java.time.ZonedDateTime = org.make.core.DateHelper.now(); scalikejdbc.`package`.update.apply(org.make.api.question.DefaultPersistentQuestionServiceComponent.PersistentQuestion).set((org.make.api.question.DefaultPersistentQuestionServiceComponent.PersistentQuestion.column.field("countries"): scalikejdbc.interpolation.SQLSyntax).->[String](question.countries.toList.mkString(","))(scalikejdbc.this.ParameterBinderFactory.stringParameterBinderFactory), (org.make.api.question.DefaultPersistentQuestionServiceComponent.PersistentQuestion.column.field("defaultLanguage"): scalikejdbc.interpolation.SQLSyntax).->[String](question.defaultLanguage.value)(scalikejdbc.this.ParameterBinderFactory.stringParameterBinderFactory), (org.make.api.question.DefaultPersistentQuestionServiceComponent.PersistentQuestion.column.field("languages"): scalikejdbc.interpolation.SQLSyntax).->[java.sql.Array](session.connection.createArrayOf("VARCHAR", question.languages.map[String](((x$17: org.make.core.reference.Language) => x$17.value)).toList.toArray[Object]((ClassTag.apply[Object](classOf[java.lang.Object]): scala.reflect.ClassTag[Object]))))(scalikejdbc.this.ParameterBinderFactory.sqlArrayParameterBinderFactory), (org.make.api.question.DefaultPersistentQuestionServiceComponent.PersistentQuestion.column.field("questions"): scalikejdbc.interpolation.SQLSyntax).->[org.make.core.technical.Multilingual[eu.timepit.refined.api.Refined[String,eu.timepit.refined.collection.NonEmpty]]](question.questions)(org.make.core.technical.Multilingual.multilingualNonEmptyBinder), (org.make.api.question.DefaultPersistentQuestionServiceComponent.PersistentQuestion.column.field("slug"): scalikejdbc.interpolation.SQLSyntax).->[String](question.slug)(scalikejdbc.this.ParameterBinderFactory.stringParameterBinderFactory), (org.make.api.question.DefaultPersistentQuestionServiceComponent.PersistentQuestion.column.field("shortTitles"): scalikejdbc.interpolation.SQLSyntax).->[Option[org.make.core.technical.Multilingual[eu.timepit.refined.api.Refined[String,eu.timepit.refined.collection.NonEmpty]]]](question.shortTitles)(org.make.core.technical.Multilingual.optMultilingualNonEmptyBinder), (org.make.api.question.DefaultPersistentQuestionServiceComponent.PersistentQuestion.column.field("operationId"): scalikejdbc.interpolation.SQLSyntax).->[Option[String]](question.operationId.map[String](((x$18: org.make.core.operation.OperationId) => x$18.value)))(scalikejdbc.this.ParameterBinderFactory.optionalParameterBinderFactory[String](scalikejdbc.this.ParameterBinderFactory.stringParameterBinderFactory)), (org.make.api.question.DefaultPersistentQuestionServiceComponent.PersistentQuestion.column.field("updatedAt"): scalikejdbc.interpolation.SQLSyntax).->[java.time.ZonedDateTime](now)(scalikejdbc.this.ParameterBinderFactory.javaTimeZonedDateTimeParameterBinderFactory)).where(scalikejdbc.`package`.sqls.eq[String]((org.make.api.question.DefaultPersistentQuestionServiceComponent.PersistentQuestion.column.field("questionId"): scalikejdbc.interpolation.SQLSyntax), question.questionId.value)(scalikejdbc.this.ParameterBinderFactory.stringParameterBinderFactory)) }).execute.apply()(session)); <artifact> val x$5: scalikejdbc.TxBoundary[Boolean] @scala.reflect.internal.annotations.uncheckedBounds = qual$1.retryableTx$default$2[Boolean](x$4); qual$1.retryableTx[Boolean](x$4)(x$5) })(context))(cats.implicits.catsStdInstancesForFuture(context)).as[org.make.core.question.Question](question)
183 21686 8252 - 8272 Select org.make.api.extensions.MakeDBExecutionContextComponent.readExecutionContext DefaultPersistentQuestionServiceComponent.this.readExecutionContext
184 19673 8285 - 8285 ApplyToImplicitArgs cats.instances.FutureInstances.catsStdInstancesForFuture cats.implicits.catsStdInstancesForFuture(context)
184 20612 8279 - 8508 ApplyToImplicitArgs scala.concurrent.Future.apply scala.concurrent.Future.apply[Boolean]({ <artifact> val qual$1: org.make.api.technical.DatabaseTransactions.RichDatabase = org.make.api.technical.DatabaseTransactions.RichDatabase({ <artifact> val x$1: String("WRITE") = "WRITE"; <artifact> val x$2: scalikejdbc.SettingsProvider = scalikejdbc.NamedDB.apply$default$2; <artifact> val x$3: scalikejdbc.ConnectionPoolContext = scalikejdbc.NamedDB.apply$default$3("WRITE", x$2); scalikejdbc.NamedDB.apply("WRITE", x$2)(x$3) }); <artifact> val x$4: scalikejdbc.DBSession => Boolean @scala.reflect.internal.annotations.uncheckedBounds = ((implicit session: scalikejdbc.DBSession) => scalikejdbc.`package`.withSQL.apply[scalikejdbc.UpdateOperation](scalikejdbc.`package`.deleteFrom.apply(org.make.api.question.DefaultPersistentQuestionServiceComponent.PersistentQuestion).where(scalikejdbc.`package`.sqls.eq[String]((org.make.api.question.DefaultPersistentQuestionServiceComponent.PersistentQuestion.column.field("questionId"): scalikejdbc.interpolation.SQLSyntax), questionId.value)(scalikejdbc.this.ParameterBinderFactory.stringParameterBinderFactory))).execute.apply()(session)); <artifact> val x$5: scalikejdbc.TxBoundary[Boolean] @scala.reflect.internal.annotations.uncheckedBounds = qual$1.retryableTx$default$2[Boolean](x$4); qual$1.retryableTx[Boolean](x$4)(x$5) })(context)
189 21361 8279 - 8513 Select cats.Functor.Ops.void cats.implicits.toFunctorOps[scala.concurrent.Future, Boolean](scala.concurrent.Future.apply[Boolean]({ <artifact> val qual$1: org.make.api.technical.DatabaseTransactions.RichDatabase = org.make.api.technical.DatabaseTransactions.RichDatabase({ <artifact> val x$1: String("WRITE") = "WRITE"; <artifact> val x$2: scalikejdbc.SettingsProvider = scalikejdbc.NamedDB.apply$default$2; <artifact> val x$3: scalikejdbc.ConnectionPoolContext = scalikejdbc.NamedDB.apply$default$3("WRITE", x$2); scalikejdbc.NamedDB.apply("WRITE", x$2)(x$3) }); <artifact> val x$4: scalikejdbc.DBSession => Boolean @scala.reflect.internal.annotations.uncheckedBounds = ((implicit session: scalikejdbc.DBSession) => scalikejdbc.`package`.withSQL.apply[scalikejdbc.UpdateOperation](scalikejdbc.`package`.deleteFrom.apply(org.make.api.question.DefaultPersistentQuestionServiceComponent.PersistentQuestion).where(scalikejdbc.`package`.sqls.eq[String]((org.make.api.question.DefaultPersistentQuestionServiceComponent.PersistentQuestion.column.field("questionId"): scalikejdbc.interpolation.SQLSyntax), questionId.value)(scalikejdbc.this.ParameterBinderFactory.stringParameterBinderFactory))).execute.apply()(session)); <artifact> val x$5: scalikejdbc.TxBoundary[Boolean] @scala.reflect.internal.annotations.uncheckedBounds = qual$1.retryableTx$default$2[Boolean](x$4); qual$1.retryableTx[Boolean](x$4)(x$5) })(context))(cats.implicits.catsStdInstancesForFuture(context)).void
211 20363 9062 - 9524 Apply org.make.core.question.Question.apply org.make.core.question.Question.apply(org.make.core.question.QuestionId.apply(this.questionId), this.slug, cats.data.NonEmptyList.fromListUnsafe[org.make.core.reference.Country](scala.Predef.wrapRefArray[org.make.core.reference.Country](scala.Predef.refArrayOps[String](scala.Predef.augmentString(PersistentQuestion.this.countries).split(',')).map[org.make.core.reference.Country](((x$19: String) => org.make.core.reference.Country.apply(x$19)))((ClassTag.apply[org.make.core.reference.Country](classOf[org.make.core.reference.Country]): scala.reflect.ClassTag[org.make.core.reference.Country]))).toList), org.make.core.reference.Language.apply(PersistentQuestion.this.defaultLanguage), cats.data.NonEmptyList.fromListUnsafe[org.make.core.reference.Language](scala.Predef.wrapRefArray[String](PersistentQuestion.this.languages).toList.map[org.make.core.reference.Language](((id: String) => org.make.core.reference.Language.apply(id)))), this.questions, this.shortTitles, this.operationId.map[org.make.core.operation.OperationId](((x$20: String) => org.make.core.operation.OperationId.apply(x$20))))
212 20781 9104 - 9119 Select org.make.api.question.DefaultPersistentQuestionServiceComponent.PersistentQuestion.questionId this.questionId
212 19931 9093 - 9120 Apply org.make.core.question.QuestionId.apply org.make.core.question.QuestionId.apply(this.questionId)
213 21415 9137 - 9146 Select org.make.api.question.DefaultPersistentQuestionServiceComponent.PersistentQuestion.slug this.slug
214 21687 9196 - 9232 ApplyToImplicitArgs scala.collection.ArrayOps.map scala.Predef.refArrayOps[String](scala.Predef.augmentString(PersistentQuestion.this.countries).split(',')).map[org.make.core.reference.Country](((x$19: String) => org.make.core.reference.Country.apply(x$19)))((ClassTag.apply[org.make.core.reference.Country](classOf[org.make.core.reference.Country]): scala.reflect.ClassTag[org.make.core.reference.Country]))
214 19612 9221 - 9231 Apply org.make.core.reference.Country.apply org.make.core.reference.Country.apply(x$19)
214 20617 9196 - 9239 Select scala.collection.IterableOnceOps.toList scala.Predef.wrapRefArray[org.make.core.reference.Country](scala.Predef.refArrayOps[String](scala.Predef.augmentString(PersistentQuestion.this.countries).split(',')).map[org.make.core.reference.Country](((x$19: String) => org.make.core.reference.Country.apply(x$19)))((ClassTag.apply[org.make.core.reference.Country](classOf[org.make.core.reference.Country]): scala.reflect.ClassTag[org.make.core.reference.Country]))).toList
214 19711 9168 - 9240 Apply cats.data.NonEmptyList.fromListUnsafe cats.data.NonEmptyList.fromListUnsafe[org.make.core.reference.Country](scala.Predef.wrapRefArray[org.make.core.reference.Country](scala.Predef.refArrayOps[String](scala.Predef.augmentString(PersistentQuestion.this.countries).split(',')).map[org.make.core.reference.Country](((x$19: String) => org.make.core.reference.Country.apply(x$19)))((ClassTag.apply[org.make.core.reference.Country](classOf[org.make.core.reference.Country]): scala.reflect.ClassTag[org.make.core.reference.Country]))).toList)
214 20563 9196 - 9216 Apply scala.collection.StringOps.split scala.Predef.augmentString(PersistentQuestion.this.countries).split(',')
215 21367 9277 - 9292 Select org.make.api.question.DefaultPersistentQuestionServiceComponent.PersistentQuestion.defaultLanguage PersistentQuestion.this.defaultLanguage
215 20355 9268 - 9293 Apply org.make.core.reference.Language.apply org.make.core.reference.Language.apply(PersistentQuestion.this.defaultLanguage)
216 21418 9364 - 9378 Apply org.make.core.reference.Language.apply org.make.core.reference.Language.apply(id)
216 19614 9315 - 9380 Apply cats.data.NonEmptyList.fromListUnsafe cats.data.NonEmptyList.fromListUnsafe[org.make.core.reference.Language](scala.Predef.wrapRefArray[String](PersistentQuestion.this.languages).toList.map[org.make.core.reference.Language](((id: String) => org.make.core.reference.Language.apply(id))))
216 19936 9343 - 9352 Select org.make.api.question.DefaultPersistentQuestionServiceComponent.PersistentQuestion.languages PersistentQuestion.this.languages
216 20519 9343 - 9379 Apply scala.collection.immutable.List.map scala.Predef.wrapRefArray[String](PersistentQuestion.this.languages).toList.map[org.make.core.reference.Language](((id: String) => org.make.core.reference.Language.apply(id)))
217 21586 9402 - 9416 Select org.make.api.question.DefaultPersistentQuestionServiceComponent.PersistentQuestion.questions this.questions
218 20735 9440 - 9456 Select org.make.api.question.DefaultPersistentQuestionServiceComponent.PersistentQuestion.shortTitles this.shortTitles
219 21334 9480 - 9516 Apply scala.Option.map this.operationId.map[org.make.core.operation.OperationId](((x$20: String) => org.make.core.operation.OperationId.apply(x$20)))
219 19717 9501 - 9515 Apply org.make.core.operation.OperationId.apply org.make.core.operation.OperationId.apply(x$20)
230 19891 9735 - 9968 Apply scala.collection.SeqFactory.Delegate.apply org.scalatest.testsuite scala.`package`.Seq.apply[String]("question_id", "countries", "default_language", "languages", "questions", "created_at", "updated_at", "operation_id", "slug", "short_titles")
243 21456 10014 - 10127 Literal <nosymbol> "question_id,countries,default_language,languages,questions,created_at,updated_at,operation_id,slug,short_titles"
245 20524 10166 - 10176 Literal <nosymbol> org.scalatest.testsuite "question"
258 21531 10669 - 11493 Apply org.make.api.question.DefaultPersistentQuestionServiceComponent.PersistentQuestion.apply DefaultPersistentQuestionServiceComponent.this.PersistentQuestion.apply(x$1, x$3, x$4, x$5, x$6, x$7, x$2, x$8, x$9, x$10)
259 19498 10727 - 10756 ApplyImplicitView scalikejdbc.interpolation.Implicits.scalikejdbcSQLSyntaxToStringImplicitDef scalikejdbc.`package`.scalikejdbcSQLSyntaxToStringImplicitDef((questionResultName.field("questionId"): scalikejdbc.interpolation.SQLSyntax))
259 21178 10710 - 10757 Apply scalikejdbc.WrappedResultSet.string resultSet.string(scalikejdbc.`package`.scalikejdbcSQLSyntaxToStringImplicitDef((questionResultName.field("questionId"): scalikejdbc.interpolation.SQLSyntax)))
260 19688 10774 - 10815 Apply scalikejdbc.WrappedResultSet.string resultSet.string(scalikejdbc.`package`.scalikejdbcSQLSyntaxToStringImplicitDef((questionResultName.field("slug"): scalikejdbc.interpolation.SQLSyntax)))
260 20680 10791 - 10814 ApplyImplicitView scalikejdbc.interpolation.Implicits.scalikejdbcSQLSyntaxToStringImplicitDef scalikejdbc.`package`.scalikejdbcSQLSyntaxToStringImplicitDef((questionResultName.field("slug"): scalikejdbc.interpolation.SQLSyntax))
261 21340 10854 - 10882 ApplyImplicitView scalikejdbc.interpolation.Implicits.scalikejdbcSQLSyntaxToStringImplicitDef scalikejdbc.`package`.scalikejdbcSQLSyntaxToStringImplicitDef((questionResultName.field("countries"): scalikejdbc.interpolation.SQLSyntax))
261 20372 10837 - 10883 Apply scalikejdbc.WrappedResultSet.string resultSet.string(scalikejdbc.`package`.scalikejdbcSQLSyntaxToStringImplicitDef((questionResultName.field("countries"): scalikejdbc.interpolation.SQLSyntax)))
262 20485 10911 - 10960 ApplyToImplicitArgs scalikejdbc.WrappedResultSet.get resultSet.get[String](scalikejdbc.`package`.scalikejdbcSQLSyntaxToStringImplicitDef((questionResultName.field("defaultLanguage"): scalikejdbc.interpolation.SQLSyntax)))(scalikejdbc.this.TypeBinder.string)
262 19854 10925 - 10959 ApplyImplicitView scalikejdbc.interpolation.Implicits.scalikejdbcSQLSyntaxToStringImplicitDef scalikejdbc.`package`.scalikejdbcSQLSyntaxToStringImplicitDef((questionResultName.field("defaultLanguage"): scalikejdbc.interpolation.SQLSyntax))
262 21411 10924 - 10924 Select scalikejdbc.TypeBinder.string scalikejdbc.this.TypeBinder.string
264 19503 11012 - 11040 ApplyImplicitView scalikejdbc.interpolation.Implicits.scalikejdbcSQLSyntaxToStringImplicitDef scalikejdbc.`package`.scalikejdbcSQLSyntaxToStringImplicitDef((questionResultName.field("languages"): scalikejdbc.interpolation.SQLSyntax))
265 21185 11057 - 11095 TypeApply scala.Any.asInstanceOf x$21.getArray().asInstanceOf[Array[String]]
266 19653 10982 - 11126 Apply scala.Option.getOrElse resultSet.arrayOpt(scalikejdbc.`package`.scalikejdbcSQLSyntaxToStringImplicitDef((questionResultName.field("languages"): scalikejdbc.interpolation.SQLSyntax))).map[Array[String]](((x$21: java.sql.Array) => x$21.getArray().asInstanceOf[Array[String]])).getOrElse[Array[String]](scala.Array.apply[String]()((ClassTag.apply[String](classOf[java.lang.String]): scala.reflect.ClassTag[String])))
266 20726 11118 - 11125 ApplyToImplicitArgs scala.Array.apply scala.Array.apply[String]()((ClassTag.apply[String](classOf[java.lang.String]): scala.reflect.ClassTag[String]))
267 20323 11161 - 11161 Select org.make.core.technical.Multilingual.multilingualNonEmptyBinder org.make.core.technical.Multilingual.multilingualNonEmptyBinder
267 21295 11162 - 11190 ApplyImplicitView scalikejdbc.interpolation.Implicits.scalikejdbcSQLSyntaxToStringImplicitDef scalikejdbc.`package`.scalikejdbcSQLSyntaxToStringImplicitDef((questionResultName.field("questions"): scalikejdbc.interpolation.SQLSyntax))
267 19862 11148 - 11191 ApplyToImplicitArgs scalikejdbc.WrappedResultSet.get resultSet.get[org.make.core.technical.Multilingual[eu.timepit.refined.api.Refined[String,eu.timepit.refined.collection.NonEmpty]]](scalikejdbc.`package`.scalikejdbcSQLSyntaxToStringImplicitDef((questionResultName.field("questions"): scalikejdbc.interpolation.SQLSyntax)))(org.make.core.technical.Multilingual.multilingualNonEmptyBinder)
268 21520 11229 - 11259 ApplyImplicitView scalikejdbc.interpolation.Implicits.scalikejdbcSQLSyntaxToStringImplicitDef scalikejdbc.`package`.scalikejdbcSQLSyntaxToStringImplicitDef((questionResultName.field("shortTitles"): scalikejdbc.interpolation.SQLSyntax))
268 19510 11215 - 11260 ApplyToImplicitArgs scalikejdbc.WrappedResultSet.get resultSet.get[Option[org.make.core.technical.Multilingual[eu.timepit.refined.api.Refined[String,eu.timepit.refined.collection.NonEmpty]]]](scalikejdbc.`package`.scalikejdbcSQLSyntaxToStringImplicitDef((questionResultName.field("shortTitles"): scalikejdbc.interpolation.SQLSyntax)))(org.make.core.technical.Multilingual.optMultilingualNonEmptyBinder)
268 20442 11228 - 11228 Select org.make.core.technical.Multilingual.optMultilingualNonEmptyBinder org.make.core.technical.Multilingual.optMultilingualNonEmptyBinder
269 20732 11282 - 11335 Apply scalikejdbc.WrappedResultSet.zonedDateTime resultSet.zonedDateTime(scalikejdbc.`package`.scalikejdbcSQLSyntaxToStringImplicitDef((questionResultName.field("createdAt"): scalikejdbc.interpolation.SQLSyntax)))
269 21144 11306 - 11334 ApplyImplicitView scalikejdbc.interpolation.Implicits.scalikejdbcSQLSyntaxToStringImplicitDef scalikejdbc.`package`.scalikejdbcSQLSyntaxToStringImplicitDef((questionResultName.field("createdAt"): scalikejdbc.interpolation.SQLSyntax))
270 19770 11381 - 11409 ApplyImplicitView scalikejdbc.interpolation.Implicits.scalikejdbcSQLSyntaxToStringImplicitDef scalikejdbc.`package`.scalikejdbcSQLSyntaxToStringImplicitDef((questionResultName.field("updatedAt"): scalikejdbc.interpolation.SQLSyntax))
270 21331 11357 - 11410 Apply scalikejdbc.WrappedResultSet.zonedDateTime resultSet.zonedDateTime(scalikejdbc.`package`.scalikejdbcSQLSyntaxToStringImplicitDef((questionResultName.field("updatedAt"): scalikejdbc.interpolation.SQLSyntax)))
271 20331 11454 - 11484 ApplyImplicitView scalikejdbc.interpolation.Implicits.scalikejdbcSQLSyntaxToStringImplicitDef scalikejdbc.`package`.scalikejdbcSQLSyntaxToStringImplicitDef((questionResultName.field("operationId"): scalikejdbc.interpolation.SQLSyntax))
271 21996 11434 - 11485 Apply scalikejdbc.WrappedResultSet.stringOpt resultSet.stringOpt(scalikejdbc.`package`.scalikejdbcSQLSyntaxToStringImplicitDef((questionResultName.field("operationId"): scalikejdbc.interpolation.SQLSyntax)))