remys.services.mysql

column-type

(column-type schema table column)
For `table` in `schema`, get `column` type.

connect!

(connect! options)
Create hikari datasource with the given `options`.

datasource

date?

(date? schema table column)

datetime?

(datetime? schema table column)

delete!

(delete! query-sql)
Tiny wrapper around `update!`, just syntactic sugar.

disconnect!

(disconnect! datasource)
Close the datasource.

format-input-keywords

(format-input-keywords input)
Convert `input` keywords from kebab-case to snake_case.

format-output-keywords

(format-output-keywords output)
Convert `output` keywords from snake_case to kebab-case.

format-value

(format-value schema table column value)
Coerce `value` to the needed type for the `column` in `table`.

init-database-connection

(init-database-connection options)
Create the database component with the given `options`.

insert!

(insert! table values)
Insert `values` into `table`.
`table` is a keyword (i.e.: :categories).
`values` is a map of columns and values (i.e.: {:name "Test"}).

kebab-case->snake-case

(kebab-case->snake-case column)

load-schema

(load-schema options)
Load in memory the schema identified by :database in `options`.

query!

(query! query-sql)
Execute a SELECT statement using the SQL in `query-sql`.
Column names are returned preserving their original case.

schema

schema!

(schema! db)
Load useful informations on all the tables in `db`.

snake-case->kebab-case

(snake-case->kebab-case column)

timestamp?

(timestamp? schema table column)

update!

(update! query-sql)
Execute an update using the SQL in `query-sql`.
`query-sql` is a vector with the SQL statement and the necessary parameters.