What's the difference between tuple and valueList? The only one I see is that tuple adds ( and ) parens around its values... The implementation and types are almost identical to valueList, to the point I wonder why not to express one in terms of another or just ditch tuple as unnecessary. Most probably I miss something – that's just my first impression.
Eventually sql.valueList, sql.rawList, sql.tupleList, sql.identifierList and sql.booleanExpression will be removed in favour of a single method sql.expressionList.
The original intention for separation was to force semantic resemblance and type strictness specific to the code fragment being generated. However, since then types have evolved for all of these helpers to allow a lot broader spectrum of allowed values.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
What's the difference between
tuple
andvalueList
? The only one I see is thattuple
adds(
and)
parens around its values... The implementation and types are almost identical tovalueList
, to the point I wonder why not to express one in terms of another or just ditchtuple
as unnecessary. Most probably I miss something – that's just my first impression.Eventually
sql.valueList
,sql.rawList
,sql.tupleList
,sql.identifierList
andsql.booleanExpression
will be removed in favour of a single methodsql.expressionList
.github.com/gajus/slonik/issues/91
The original intention for separation was to force semantic resemblance and type strictness specific to the code fragment being generated. However, since then types have evolved for all of these helpers to allow a lot broader spectrum of allowed values.