A slick Database instance
Holds the idiom used for building the SQL statements
List of all Tables in the database
Holds a list of all column names, with the proper placeholder alias ("Container_0_1"), quoted according to the database idiom
Holds a list of all column names, with the proper placeholder alias ("Container_0_1"), quoted according to the database idiom
a list of column names with the right references like such "Container"."Number" or "Container01"."Number"
List with all the data types of all columns
Converts a value to string according to the defined database idiom, so it can be used in queries
Converts a value to string according to the defined database idiom, so it can be used in queries
any value
Finds a column in a table and based on a name returning the table and column.
Finds a column in a table and based on a name returning the table and column.
to search the column in
name of the column to search for
tuple with the table and column found if any, None otherwise
Composes the full text search string to be used in a SELECT statement when a quick search is performed
Composes the full text search string to be used in a SELECT statement when a quick search is performed
all tables in the query
Finds the column with the given name.
Finds the column with the given name. If not found, returns None
the table where to find the column
the name of the column we want to find
Returns the needed table infos and joins for a select statement.
Returns the needed table infos, joins and column names for a select statement.
Returns the needed table infos, joins and column names for a select statement.
StatementBuilderInfo with the tableInfos, columnNames and join string.
Composes the join string to be used in a SELECT statement
Composes the join string to be used in a SELECT statement
all info of all the tables that will be in the select statement.
a string representing the join statements for the select.
Returns the order by statement whether a filter was included or not.
Returns the order by statement whether a filter was included or not.
a string for the orderByFilter or a default order by string for the idColumn.
Build an inner join string to be used when composing SELECT statements.
Builds a left join string to be used when composing SELECT statements.
Returns a string of the Order By segment to use in the SELECT statement
Returns a string of the Order By segment to use in the SELECT statement
where the column to order by might be
column and order to use in the statement
Builds a string to apply paging to the SELECT statement
Transforms a value in a parameter to be used in an insert or update sql statement.
Transforms a value in a parameter to be used in an insert or update sql statement.
In order to convert the values into parameters we need to know the underlying type of the value, in order to go around type erasure we pass the column of the value along with the value to be converted, this way when the value is None we can find out which underlying type None pertains to. This needs to be done because SetParameter sets a type for None values that needs to equal the sql column type.
of the parameter
to which pertains the parameter
positioned parameters
Transforms a value in a parameter to be used in a sql statement according to its type.
Transforms a value in a parameter to be used in a sql statement according to its type.
of the parameter
positioned parameters
Transforms a filter string in a partial sql statement string with the parameters to use.
Transforms a filter string in a partial sql statement string with the parameters to use.
used to join the different filtered statements
to search in order to get the names present in the filter
that contains the filters to apply in the sql statement
a partial sql statement and the parameters to apply in it.
Checks if the search string pertains to an advanced search or a quick search and calls upon parseSearchParams or fullTextSearch respectively
Checks if the search string pertains to an advanced search or a quick search and calls upon parseSearchParams or fullTextSearch respectively
a tuple with the partialSql string and a list of params that apply to it.
Takes the search expression from user input and parses it according to the current dbIdiom
Takes the search expression from user input and parses it according to the current dbIdiom
Replace multiple spaces by a single one then replace a space by an AND operator
the search expression input by the user
Transforms a search string in a partial sql statement string with the parameters to use.
Transforms a search string in a partial sql statement string with the parameters to use.
This function is only used when performing an advanced search.
used to join the different filtered statements
to search in order to get the names present in the search string
string that contains the conditions to apply in the sql statement.
a partial sql statement and the parameters to apply in it.
Parses a comma separated string of table names into a list of TableInfo instances.
Parses a comma separated string of table names into a list of TableInfo instances. Table names are case insensitive.
In order to parse the table names it searches the main table's reference list and tries to match them with the table names in the include string. The results is then a pair containing the table associated with that reference and the name of the reference.
Example: for include as "containertype,containerstatus" when mainTable is Container returns List(TableInfo(Table[ContainerType],"ContainerType","Container","_0_1","ContainerType"), TableInfo(Table[ContainerStatus],"ContainerStatus","Container","_0_0","ContainerStatus"))
Example: for include as "container,container.containerstatus" when mainTable is Movement returns List(TableInfo(Table[Container],"Container","Movement","_0_3","Container"), TableInfo(Table[ContainerStatus],"ContainerStatus","Container_0_3","_13_0","Container.ContainerStatus"))
Returns the correct alias to be used when reading the query results.
Returns the correct alias to be used when reading the query results.
a string representing the correct alias to read in query results.
Returns the correct alias to be used when reading the query results.
Returns the correct alias to be used when reading the query results.
a string representig the correct alias to read in query results.
Holds a list of all column names, properly quoted for the current dbIdiom value
Holds a list of all column names, quoted and with the SQL alias declaration appended
Holds a list of all column names, quoted and with the SQL alias declaration appended
These aliases are used in SELECTS and have the goal to prevent duplicated column names where there are inner joins. Example: for a column named Id in the Container table, the corresponding value in this list is "Container"."Id" AS Container0Id given that 0 is the position of the column.
Example: for a column named Id in a reference named CurrentContainer, the corresponding values in this list is "CurrentContainer"."Id" AS CurrentContainer10Id.
Holds Table.pk properly quoted for the database idiom and ready to be used in queries
Holds the quoted table name.
Holds the quoted table name.
Example: considering a table named Container, this value is "Container" if idiom is PostgreSQL or [Container] if SQLServer
Quotes a string according to the defined dbIdiom
Quotes a string according to the defined dbIdiom
Example: if string is Spin, this returns [Spin] if dbIdiom is SQLServer and "Spin" if PostgreSQL
the string to be quoted
Removes special columns and values like Primary Key and SyncTimestamp from a table a list of values, returns ColumnValues with a list of columns and values.
Removes special columns and values like Primary Key and SyncTimestamp from a table a list of values, returns ColumnValues with a list of columns and values.
the table where to remove the columns.
the list of values related to the given table.
Executes the thunk (fn) and retries if occurs a SQL error of the type defined in the error parameter
Executes the thunk (fn) and retries if occurs a SQL error of the type defined in the error parameter
the error type that causes the retrie
the number of retries (not the number of runs). Deafault is one retry
the function to run and retry, if necessary
Retrieves the Table instance with the given name.
Retrieves the Table instance with the given name. If not found, returns None. The name is case insensitive.
Retrieves the Table for the type T
Takes a value in string format and tries to convert it to a quoted string according to the database idiom and column data type
Defines a data model to be used by DAO instances