From bcc173dc2fac9ee67aa6ce157421ef48bd6d1f8b Mon Sep 17 00:00:00 2001 From: "Documenter.jl" Date: Wed, 7 Jun 2023 17:59:15 +0000 Subject: [PATCH] build based on e6718a2 --- dev/api/index.html | 66 ++++++++++++++++++------------------- dev/customtype/index.html | 2 +- dev/index.html | 2 +- dev/migrations/index.html | 2 +- dev/querybuilder/index.html | 30 ++++++++--------- dev/search/index.html | 2 +- 6 files changed, 52 insertions(+), 52 deletions(-) diff --git a/dev/api/index.html b/dev/api/index.html index 8781594..b355711 100644 --- a/dev/api/index.html +++ b/dev/api/index.html @@ -1,34 +1,34 @@ -API · Wasabi.jl

API

Wasabi.aliasMethod
alias(m::String)
-Returns the alias of the table for the given model.
source
Wasabi.aliasMethod
alias(m::Type{T}) where {T <: Model}
-Returns the alias of the table for the given model.
source
Wasabi.allFunction
all(db::Any, m::Type{T}) where {T <: Model}
-Returns all rows of the given model.
source
Wasabi.colnamesMethod
colnames(m::Type{T}) where {T <: Model}
-Returns the names of the columns for the given model.
source
Wasabi.coltypeMethod
coltype(m::Type{T}, col::Symbol) where {T <: Model}
-Returns the column type for the given column and model.
source
Wasabi.connectFunction
connect(config::ConnectionConfiguration)
-Connects to the database using the given configuration.
source
Wasabi.constraintsMethod
constraints(m::Type{T}) where {T <: Model}
-Returns the constraints for the given model.
source
Wasabi.create_schemaFunction
create_schema(db::Any, m::Type{T}) where {T <: Model}
-Creates the schema for the given model and constraints.
source
Wasabi.delete!Function
delete(db::Any, model::T) where {T <: Model}
-Deletes the given model from the database.
source
Wasabi.delete_all!Function
delete_all(db::Any, m::Type{T}) where {T <: Model}
-Deletes all rows from the given model.
source
Wasabi.delete_schemaFunction
delete_schema(db::Any, m::Type{T}) where {T <: Model}
-Deletes the schema for the given model.
source
Wasabi.df2modelMethod
df2model(m::Type{T}, df::DataFrame) where {T <: Model}
-Converts the given DataFrame to the given model.
source
Wasabi.exclude_fieldsMethod
exclude_fields(m::Type{T}) where {T <: Model}
-Returns the fields to exclude from the model when running queries.
source
Wasabi.execute_queryFunction
execute_query(db::Any, query::RawQuery, params::Vector{Any})
-Executes the given query with the given parameters.
source
Wasabi.firstFunction
first(db::Any, m::Type{T}, id::Any) where {T <: Model}
-Returns the first row of the given model with the given id.
source
Wasabi.foreign_keysMethod
foreign_keys(m::Type{T})::Vector{ForeignKeyConstraint} where {T<:Model}
-Returns the foreign key constraints for the given model.
source
Wasabi.insert!Function
insert(db::Any, model::T) where {T <: Model}
-Inserts the given model into the database.
source
Wasabi.isnullableMethod
isnullable(m::Type{T}, field::Symbol, constraints::Vector{S}) where {T <: Model,S<:Wasabi.ModelConstraint}
-Returns true if the given column is nullable.
source
Wasabi.mappingFunction
mapping(db::Type{S}, t::Type{T})::String where {S,T}
-Returns the mapping for the given database and type.
source
Wasabi.primary_keyMethod
primary_key(m::Type{T})::Union{PrimaryKeyConstraint, Nothing} where {T<:Model}
-Returns the primary key constraint for the given model.
source
Wasabi.tablenameMethod
tablename(m::Type{T}) where {T <: Model}
-Returns the name of the table for the given model.
source
Wasabi.to_sql_valueFunction
to_sql_value(db::Type{Any}, v::Any)
-Converts the given value to a value that can be used in a SQL query.
source
Wasabi.unique_constraintsMethod
unique_constraints(m::Type{T})::Vector{UniqueConstraint} where {T<:Model}
-Returns the unique constraints for the given model.
source
Wasabi.update!Function
update(db::Any, model::T) where {T <: Model}
-Updates the given model in the database.
source
+API · Wasabi.jl

API

Wasabi.aliasMethod
alias(m::String)
+Returns the alias of the table for the given model.
source
Wasabi.aliasMethod
alias(m::Type{T}) where {T <: Model}
+Returns the alias of the table for the given model.
source
Wasabi.allFunction
all(db::Any, m::Type{T}) where {T <: Model}
+Returns all rows of the given model.
source
Wasabi.colnamesMethod
colnames(m::Type{T}) where {T <: Model}
+Returns the names of the columns for the given model.
source
Wasabi.coltypeMethod
coltype(m::Type{T}, col::Symbol) where {T <: Model}
+Returns the column type for the given column and model.
source
Wasabi.connectFunction
connect(config::ConnectionConfiguration)
+Connects to the database using the given configuration.
source
Wasabi.constraintsMethod
constraints(m::Type{T}) where {T <: Model}
+Returns the constraints for the given model.
source
Wasabi.create_schemaFunction
create_schema(db::Any, m::Type{T}) where {T <: Model}
+Creates the schema for the given model and constraints.
source
Wasabi.delete!Function
delete(db::Any, model::T) where {T <: Model}
+Deletes the given model from the database.
source
Wasabi.delete_all!Function
delete_all(db::Any, m::Type{T}) where {T <: Model}
+Deletes all rows from the given model.
source
Wasabi.delete_schemaFunction
delete_schema(db::Any, m::Type{T}) where {T <: Model}
+Deletes the schema for the given model.
source
Wasabi.df2modelMethod
df2model(m::Type{T}, df::DataFrame) where {T <: Model}
+Converts the given DataFrame to the given model.
source
Wasabi.exclude_fieldsMethod
exclude_fields(m::Type{T}) where {T <: Model}
+Returns the fields to exclude from the model when running queries.
source
Wasabi.execute_queryFunction
execute_query(db::Any, query::RawQuery, params::Vector{Any})
+Executes the given query with the given parameters.
source
Wasabi.firstFunction
first(db::Any, m::Type{T}, id::Any) where {T <: Model}
+Returns the first row of the given model with the given id.
source
Wasabi.foreign_keysMethod
foreign_keys(m::Type{T})::Vector{ForeignKeyConstraint} where {T<:Model}
+Returns the foreign key constraints for the given model.
source
Wasabi.insert!Function
insert(db::Any, model::T) where {T <: Model}
+Inserts the given model into the database.
source
Wasabi.isnullableMethod
isnullable(m::Type{T}, field::Symbol, constraints::Vector{S}) where {T <: Model,S<:Wasabi.ModelConstraint}
+Returns true if the given column is nullable.
source
Wasabi.mappingFunction
mapping(db::Type{S}, t::Type{T})::String where {S,T}
+Returns the mapping for the given database and type.
source
Wasabi.primary_keyMethod
primary_key(m::Type{T})::Union{PrimaryKeyConstraint, Nothing} where {T<:Model}
+Returns the primary key constraint for the given model.
source
Wasabi.tablenameMethod
tablename(m::Type{T}) where {T <: Model}
+Returns the name of the table for the given model.
source
Wasabi.to_sql_valueFunction
to_sql_value(db::Type{Any}, v::Any)
+Converts the given value to a value that can be used in a SQL query.
source
Wasabi.unique_constraintsMethod
unique_constraints(m::Type{T})::Vector{UniqueConstraint} where {T<:Model}
+Returns the unique constraints for the given model.
source
Wasabi.update!Function
update(db::Any, model::T) where {T <: Model}
+Updates the given model in the database.
source
diff --git a/dev/customtype/index.html b/dev/customtype/index.html index 258d8c3..e2946b7 100644 --- a/dev/customtype/index.html +++ b/dev/customtype/index.html @@ -17,4 +17,4 @@ model = TestModel(1, CustomType(Dict("key" => "value"))) Wasabi.insert!(conn, model) -model = Wasabi.first(conn, TestModel, 1) # model.custom.value["key"] == "value" +model = Wasabi.first(conn, TestModel, 1) # model.custom.value["key"] == "value" diff --git a/dev/index.html b/dev/index.html index e9ef30b..ded312a 100644 --- a/dev/index.html +++ b/dev/index.html @@ -54,4 +54,4 @@ qb = QueryBuilder.select(User) |> QueryBuilder.where(:(and, (User, name, like, "%John%"))) |> QueryBuilder.limit(1) users = Wasabi.execute_query(conn, qb) -Wasabi.disconnect(conn)

Documentation for Wasabi.

+Wasabi.disconnect(conn)

Documentation for Wasabi.

diff --git a/dev/migrations/index.html b/dev/migrations/index.html index 3ea63ff..9628ce2 100644 --- a/dev/migrations/index.html +++ b/dev/migrations/index.html @@ -6,4 +6,4 @@ using SQLite version = "xxx" # using Migrations.get_last_version(path) gives you the latest available migration -Migrations.execute(db, path, version) +Migrations.execute(db, path, version) diff --git a/dev/querybuilder/index.html b/dev/querybuilder/index.html index dad91d5..7fc5595 100644 --- a/dev/querybuilder/index.html +++ b/dev/querybuilder/index.html @@ -19,18 +19,18 @@ sql, params = QueryBuilder.build(query) # println(sql.value) SELECT user.id, user.name FROM "user" user WHERE (user.name LIKE $1 OR user.id IN $2) LIMIT 1 -# println(params) # 2-element Vector{Any}: "%mattia%" [1, 2, 3]
Wasabi.QueryBuilder.JoinType
Join{T<:Wasabi.Model}
-Represents a join for the given model.
source
Wasabi.QueryBuilder.QueryType
Query{T<:Wasabi.Model}
-Represents a query for the given model.
source
Wasabi.QueryBuilder.SelectExprType
SelectExpr{T<:Wasabi.Model}
-Represents a select expression for the given model.
source
Wasabi.QueryBuilder.buildMethod
build(q::Query)::Tuple{RawQuery, Vector{Any}}
-Builds the query and returns a tuple of the query string and the parameters.
source
Wasabi.QueryBuilder.fromMethod
from(source::Type{T})::Query where {T <: Model}
-Creates a new query for the given model.
source
Wasabi.QueryBuilder.groupbyMethod
groupby(groupby::Vector{Symbol})
-Sets the group by clause for the given query.
source
Wasabi.QueryBuilder.joinMethod
join(m::Type{T}, type::Symbol, on::Tuple{Symbol, Symbol}, select_fields::Vector{Symbol} = Symbol[]) where {T <: Model}
-Joins the given model to the query.
source
Wasabi.QueryBuilder.limitMethod
limit(limit::Int)
-Sets the limit for the given query.
source
Wasabi.QueryBuilder.offsetMethod
offset(offset::Int)
-Sets the offset for the given query.
source
Wasabi.QueryBuilder.orderbyMethod
orderby(orderby::Vector{Symbol})
-Sets the order by clause for the given query.
source
Wasabi.QueryBuilder.selectFunction
select(select::Union{Vector{Symbol}, Nothing} = nothing)
-Sets the selected columns for the given query. If no columns are specified, all columns are selected.
source
Wasabi.QueryBuilder.selectMethod
selectselect(source::Type{T}, field::Symbol, alias::Union{Symbol, Nothing} = nothing, fn::Union{Symbol, Nothing} = nothing) where {T<:Wasabi.Model}
-Sets the selected columns for the given query.
source
Wasabi.QueryBuilder.selectMethod
select(source::Type{T}, select::Vector{Symbol})
-Sets the selected columns for the given query.
source
Wasabi.QueryBuilder.whereMethod
where(expr::Expr)
-Sets the where clause for the given query.
source
+# println(params) # 2-element Vector{Any}: "%mattia%" [1, 2, 3]
Wasabi.QueryBuilder.JoinType
Join{T<:Wasabi.Model}
+Represents a join for the given model.
source
Wasabi.QueryBuilder.QueryType
Query{T<:Wasabi.Model}
+Represents a query for the given model.
source
Wasabi.QueryBuilder.SelectExprType
SelectExpr{T<:Wasabi.Model}
+Represents a select expression for the given model.
source
Wasabi.QueryBuilder.buildMethod
build(q::Query)::Tuple{RawQuery, Vector{Any}}
+Builds the query and returns a tuple of the query string and the parameters.
source
Wasabi.QueryBuilder.fromMethod
from(source::Type{T})::Query where {T <: Model}
+Creates a new query for the given model.
source
Wasabi.QueryBuilder.groupbyMethod
groupby(groupby::Vector{Symbol})
+Sets the group by clause for the given query.
source
Wasabi.QueryBuilder.joinMethod
join(m::Type{T}, type::Symbol, on::Tuple{Symbol, Symbol}, select_fields::Vector{Symbol} = Symbol[]) where {T <: Model}
+Joins the given model to the query.
source
Wasabi.QueryBuilder.limitMethod
limit(limit::Int)
+Sets the limit for the given query.
source
Wasabi.QueryBuilder.offsetMethod
offset(offset::Int)
+Sets the offset for the given query.
source
Wasabi.QueryBuilder.orderbyMethod
orderby(orderby::Vector{Symbol})
+Sets the order by clause for the given query.
source
Wasabi.QueryBuilder.selectFunction
select(select::Union{Vector{Symbol}, Nothing} = nothing)
+Sets the selected columns for the given query. If no columns are specified, all columns are selected.
source
Wasabi.QueryBuilder.selectMethod
selectselect(source::Type{T}, field::Symbol, alias::Union{Symbol, Nothing} = nothing, fn::Union{Symbol, Nothing} = nothing) where {T<:Wasabi.Model}
+Sets the selected columns for the given query.
source
Wasabi.QueryBuilder.selectMethod
select(source::Type{T}, select::Vector{Symbol})
+Sets the selected columns for the given query.
source
Wasabi.QueryBuilder.whereMethod
where(expr::Expr)
+Sets the where clause for the given query.
source
diff --git a/dev/search/index.html b/dev/search/index.html index dd07935..099f193 100644 --- a/dev/search/index.html +++ b/dev/search/index.html @@ -1,2 +1,2 @@ -Search · Wasabi.jl

Loading search...

    +Search · Wasabi.jl

    Loading search...