remys.api.resources.checks
as
(as s)
Return the second part (alias) of `s`, where `s` is "column:alias".
column
(column s)
Return the first part (column name) of `s`, where `s` is "column:alias".
column-exists?
(column-exists? schema table column)
Check if `column` exists in the `table` in `schema`.
columns-exist?
(columns-exist? schema table columns)
Check if all the `columns` exists in the `table` in `schema`.
composite-key?
(composite-key? id)
Check if `id` is a composite key.
To be a composite key, the values in `id` must be separated by three
underscores.
record-exists?
(record-exists? schema table id)
Check if the record identified by `id` exists in the `table` in `schema`.
string->number?
(string->number? s)
Check if `s` is a string corresponding to number.
table-exists?
(table-exists? schema table)
Check if `table` exists in the `schema`.
valid-query-fields?
(valid-query-fields? schema table fields)
Check that `fields` matches the columns in the `table` in `schema`.
`fields` is a string with comma-separated values.
valid-query?
(valid-query? query)
Check if the query contains create/delete/drop/update instructions.