API
Wasabi.QueryBuilder.JoinWasabi.QueryBuilder.QueryWasabi.QueryBuilder.SelectExprWasabi.QueryBuilder.buildWasabi.QueryBuilder.fromWasabi.QueryBuilder.groupbyWasabi.QueryBuilder.joinWasabi.QueryBuilder.limitWasabi.QueryBuilder.offsetWasabi.QueryBuilder.orderbyWasabi.QueryBuilder.selectWasabi.QueryBuilder.selectWasabi.QueryBuilder.selectWasabi.QueryBuilder.whereWasabi.aliasWasabi.aliasWasabi.allWasabi.begin_transactionWasabi.colnamesWasabi.coltypeWasabi.commit!Wasabi.connectWasabi.constraintsWasabi.create_schemaWasabi.delete!Wasabi.delete_all!Wasabi.delete_schemaWasabi.df2modelWasabi.disconnectWasabi.execute_queryWasabi.firstWasabi.foreign_keysWasabi.from_sql_valueWasabi.insert!Wasabi.isnullableWasabi.mappingWasabi.model2tupleWasabi.primary_keyWasabi.rollbackWasabi.tablenameWasabi.tablenameWasabi.to_sql_valueWasabi.unique_constraintsWasabi.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.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.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.