QueryWriting

This trait is just to help you write List queries and Update queries. Generally these involved a bunch of optional filters for lists or potential updates on update and you end up havin to craft the query piece by piece by hand.

Companion
object
class Object
trait Matchable
class Any

Value members

Concrete methods

def noCombination(groups: Seq[QueryGroup], query: StringBuilder, existingData: Seq[Any]): Seq[Any]
def updateClause(fields: Map[String, Option[Any]], query: StringBuilder, existingData: Seq[Any], prependSetToQuery: Boolean): Seq[Any]

Writes the update clause

Writes the update clause

Value Params
existingData

Optional list of data to prepend to the added data

fields

The new values to set

prependSetToQuery

Whether or not to add the word 'SET' to the query

query

Your query

Returns

The data list of the query

def where(groups: QueryGroup, query: StringBuilder, existingData: Seq[Any], prependWhereToQuery: Boolean): Seq[Any]

Translates a tree of QueryGroups into sql strings and gives back the data value array

Translates a tree of QueryGroups into sql strings and gives back the data value array

Value Params
existingData

Optional list of data to prepend to the added data

groups

The column comparisons

prependWhereToQuery

Whether or not to add the word 'WHERE' to the query

query

A string builder to write the query into

Returns

The data list of the query