API
Wasabi.QueryBuilder.Join
Wasabi.QueryBuilder.Query
Wasabi.QueryBuilder.SelectExpr
Wasabi.QueryBuilder.build
Wasabi.QueryBuilder.from
Wasabi.QueryBuilder.groupby
Wasabi.QueryBuilder.join
Wasabi.QueryBuilder.limit
Wasabi.QueryBuilder.offset
Wasabi.QueryBuilder.orderby
Wasabi.QueryBuilder.select
Wasabi.QueryBuilder.select
Wasabi.QueryBuilder.select
Wasabi.QueryBuilder.where
Wasabi.alias
Wasabi.alias
Wasabi.all
Wasabi.autoincrement_fields
Wasabi.begin_transaction
Wasabi.colnames
Wasabi.coltype
Wasabi.commit!
Wasabi.connect
Wasabi.constraints
Wasabi.create_schema
Wasabi.delete!
Wasabi.delete_all!
Wasabi.delete_schema
Wasabi.df2model
Wasabi.disconnect
Wasabi.exclude_fields
Wasabi.execute_query
Wasabi.first
Wasabi.foreign_keys
Wasabi.from_sql_value
Wasabi.insert!
Wasabi.isnullable
Wasabi.mapping
Wasabi.model2tuple
Wasabi.primary_key
Wasabi.rollback
Wasabi.tablename
Wasabi.tablename
Wasabi.to_sql_value
Wasabi.unique_constraints
Wasabi.update!
Wasabi.alias
— Methodalias(m::String)
-Returns the alias of the table for the given model.
Wasabi.alias
— Methodalias(m::Type{T}) where {T <: Model}
-Returns the alias of the table for the given model.
Wasabi.all
— Functionall(db::Any, m::Type{T}) where {T <: Model}
-Returns all rows of the given model.
Wasabi.autoincrement_fields
— Methodautoincrement_fields(m::Type{T}) where {T <: Model}
-Returns the fields that are autoincremented.
Wasabi.begin_transaction
— Functionbegin_transaction(db::Any)
-Begins a transaction.
Wasabi.colnames
— Methodcolnames(m::Type{T}) where {T <: Model}
-Returns the names of the columns for the given model.
Wasabi.coltype
— Methodcoltype(m::Type{T}, col::Symbol) where {T <: Model}
-Returns the column type for the given column and model.
Wasabi.commit!
— Functioncommit!(db::Any)
-Commits the current transaction.
Wasabi.connect
— Functionconnect(config::ConnectionConfiguration)
-Connects to the database using the given configuration.
Wasabi.constraints
— Methodconstraints(m::Type{T}) where {T <: Model}
-Returns the constraints for the given model.
Wasabi.create_schema
— Functioncreate_schema(db::Any, m::Type{T}) where {T <: Model}
-Creates the schema for the given model and constraints.
Wasabi.delete!
— Functiondelete(db::Any, model::T) where {T <: Model}
-Deletes the given model from the database.
Wasabi.delete_all!
— Functiondelete_all(db::Any, m::Type{T}) where {T <: Model}
-Deletes all rows from the given model.
Wasabi.delete_schema
— Functiondelete_schema(db::Any, m::Type{T}) where {T <: Model}
-Deletes the schema for the given model.
Wasabi.df2model
— Methoddf2model(m::Type{T}, df::DataFrame) where {T <: Model}
-Converts the given DataFrame to the given model.
Wasabi.disconnect
— Functiondisconnect(db::Any)
-Disconnects from the database.
Wasabi.exclude_fields
— Methodexclude_fields(m::Type{T}) where {T <: Model}
-Returns the fields to exclude from the model when running queries.
Wasabi.execute_query
— Functionexecute_query(db::Any, query::RawQuery, params::Vector{Any})
-Executes the given query with the given parameters.
Wasabi.first
— Functionfirst(db::Any, m::Type{T}, id::Any) where {T <: Model}
-Returns the first row of the given model with the given id.
Wasabi.foreign_keys
— Methodforeign_keys(m::Type{T})::Vector{ForeignKeyConstraint} where {T<:Model}
-Returns the foreign key constraints for the given model.
Wasabi.from_sql_value
— Functionfrom_sql_value(db::Type{Any}, v::Any)
-Converts the SQL value to the struct type value.
Wasabi.insert!
— Functioninsert(db::Any, model::T) where {T <: Model}
-Inserts the given model into the database.
Wasabi.isnullable
— Methodisnullable(m::Type{T}, field::Symbol, constraints::Vector{S}) where {T <: Model,S<:Wasabi.ModelConstraint}
-Returns true if the given column is nullable.
Wasabi.mapping
— Functionmapping(db::Type{S}, t::Type{T})::String where {S,T}
-Returns the mapping for the given database and type.
Wasabi.model2tuple
— Methodmodel2tuple(m::T) where {T <: Model}
-Converts the given model to a tuple.
Wasabi.primary_key
— Methodprimary_key(m::Type{T})::Union{PrimaryKeyConstraint, Nothing} where {T<:Model}
-Returns the primary key constraint for the given model.
Wasabi.rollback
— Functionrollback(db::Any)
-Rolls back the current transaction.
Wasabi.tablename
— Methodtablename(m::String)
-Returns the name of the table for the given model.
Wasabi.tablename
— Methodtablename(m::Type{T}) where {T <: Model}
-Returns the name of the table for the given model.
Wasabi.to_sql_value
— Functionto_sql_value(db::Type{Any}, v::Any)
-Converts the given value to a value that can be used in a SQL query.
Wasabi.unique_constraints
— Methodunique_constraints(m::Type{T})::Vector{UniqueConstraint} where {T<:Model}
-Returns the unique constraints for the given model.
Wasabi.update!
— Functionupdate(db::Any, model::T) where {T <: Model}
-Updates the given model in the database.