https://kotlinlang.org logo
#exposed
Title
# exposed
s

SackCastellon

02/07/2020, 9:58 PM
@tapac what is the difference between
LiteralOp
and
QueryParameter
?
LiteralOp
converts the specified
value
to a SQL value using the specified
columnType
, and
QueryParameter
, when the query uses a prepared statement, adds a
?
for each value and then injects the actual value, and when it is not prepared, just works like the
LiteralOp
?
t

tapac

02/08/2020, 1:45 PM
LiteralOp
inlines it’s value while
QueryParameter
could be used in prepared statement. I’m not sure that LiteralOps have much sence against
QueryParameter
but I guess there are should be cases when you have to inline values in query.
👍 1
3 Views