remys.api.resources.format
create-where
(create-where pks values)
Create the where conditions linking `pks` to `values.` E.g.: id = 1 and name = 'test'
format-as
(format-as v)
Format the elements in `v` as SQL query parameters. E.g.: [test Test] => test as test [test] => test
format-column-value
(format-column-value schema table column value)
Convert `value` in a format suitable for MySQL.
format-fields
(format-fields fs)
Transform `fs` in a format suitable for MySQL. E.g.: id,text:Text => id, text as Text
format-like
(format-like column like)
Format `column` and `like` as an SQL where condition.
format-likes
(format-likes fs like)
Format the elements in `fs` as SQL where conditions with `like`.
format-params
(format-params params)
Format `params` map as where conditions.
format-update-params
(format-update-params schema table params)
Format `params` map as update set values.
kebab-case->snake-case
(kebab-case->snake-case v)
Transform the first element of `v` from kebab-case to snake_case.
params->mysql-params
(params->mysql-params schema table params)
Convert `params` in a format suitable for MySQL.
wrap-string
(wrap-string s)
Wrap `s` in single quotes if `s` is a string. Useful for SQL.