It is not big deal to disable this feature at the testing side but how can I workaround it in the driver itself?
Just to override expr method doesn't look like it solve the issue here.
class QueryBuilder(tree: Node, state: CompilerState) extends super.QueryBuilder(tree, state) {
protected override val supportsTuples = false
protected override val concatOperator = Some("||")
protected override val hasPiFunction = true // since version 9.2
override def expr(n: Node, skipParens: Boolean = false) = n match {
case Library.NextValue(SequenceNode(name)) => b"${quoteIdentifier(name)}.NEXTVAL"
case Library.CurrentValue(SequenceNode(name)) => b"${quoteIdentifier(name)}.CURRVAL"
case _ => super.expr(n, skipParens)
}
}