Missing docstring for connect
. Check Documenter's build log for details.
Missing docstring for disconnect
. Check Documenter's build log for details.
Missing docstring for connection
. Check Documenter's build log for details.
Missing docstring for UnsupportedException
. Check Documenter's build log for details.
Missing docstring for DataFrames.DataFrame
. Check Documenter's build log for details.
Missing docstring for find
. Check Documenter's build log for details.
Missing docstring for onereduce
. Check Documenter's build log for details.
Missing docstring for findone
. Check Documenter's build log for details.
Base.one
— Functionone(x)
one(T::type)
Return a multiplicative identity for x
: a value such that one(x)*x == x*one(x) == x
. Alternatively one(T)
can take a type T
, in which case one
returns a multiplicative identity for any x
of type T
.
If possible, one(x)
returns a value of the same type as x
, and one(T)
returns a value of type T
. However, this may not be the case for types representing dimensionful quantities (e.g. time in days), since the multiplicative identity must be dimensionless. In that case, one(x)
should return an identity value of the same precision (and shape, for matrices) as x
.
If you want a quantity that is of the same type as x
, or of type T
, even if x
is dimensionful, use oneunit
instead.
See also the identity
function, and I
in LinearAlgebra
for the identity matrix.
Examples
julia> one(3.7)
1.0
julia> one(Int)
1
julia> import Dates; one(Dates.Day(1))
1
Missing docstring for randone
. Check Documenter's build log for details.
Base.all
— Functionall(itr) -> Bool
Test whether all elements of a boolean collection are true
, returning false
as soon as the first false
value in itr
is encountered (short-circuiting). To short-circuit on true
, use any
.
If the input contains missing
values, return missing
if all non-missing values are true
(or equivalently, if the input contains no false
value), following three-valued logic.
See also: all!
, any
, count
, &
, , &&
, allunique
.
Examples
julia> a = [true,false,false,true]
4-element Vector{Bool}:
1
0
0
1
julia> all(a)
false
julia> all((println(i); v) for (i, v) in enumerate(a))
1
2
false
julia> all([missing, false])
false
julia> all([true, missing])
missing
all(p, itr) -> Bool
Determine whether predicate p
returns true
for all elements of itr
, returning false
as soon as the first item in itr
for which p
returns false
is encountered (short-circuiting). To short-circuit on true
, use any
.
If the input contains missing
values, return missing
if all non-missing values are true
(or equivalently, if the input contains no false
value), following three-valued logic.
Examples
julia> all(i->(4<=i<=6), [4,5,6])
true
julia> all(i -> (println(i); i < 3), 1:10)
1
2
3
false
julia> all(i -> i > 0, [1, missing])
missing
julia> all(i -> i > 0, [-1, missing])
false
julia> all(i -> i > 0, [1, 2])
true
all(A; dims)
Test whether all values along the given dimensions of an array are true
.
Examples
julia> A = [true false; true true]
2×2 Matrix{Bool}:
1 0
1 1
julia> all(A, dims=1)
1×2 Matrix{Bool}:
1 0
julia> all(A, dims=2)
2×1 Matrix{Bool}:
0
1
all(p, A; dims)
Determine whether predicate p
returns true
for all elements along the given dimensions of an array.
Examples
julia> A = [1 -1; 2 2]
2×2 Matrix{Int64}:
1 -1
2 2
julia> all(i -> i > 0, A, dims=1)
1×2 Matrix{Bool}:
1 0
julia> all(i -> i > 0, A, dims=2)
2×1 Matrix{Bool}:
0
1
Missing docstring for first
. Check Documenter's build log for details.
Missing docstring for last
. Check Documenter's build log for details.
Missing docstring for save
. Check Documenter's build log for details.
Missing docstring for save!
. Check Documenter's build log for details.
Missing docstring for save!!
. Check Documenter's build log for details.
Missing docstring for _save!!
. Check Documenter's build log for details.
Missing docstring for updatewith!
. Check Documenter's build log for details.
Missing docstring for convertmethod
. Check Documenter's build log for details.
Missing docstring for booltypes
. Check Documenter's build log for details.
Missing docstring for autoconvert
. Check Documenter's build log for details.
Missing docstring for updatewith!!
. Check Documenter's build log for details.
Missing docstring for updatewith
. Check Documenter's build log for details.
Missing docstring for createwith
. Check Documenter's build log for details.
Missing docstring for updateby_or_create
. Check Documenter's build log for details.
Missing docstring for update_or_create
. Check Documenter's build log for details.
Missing docstring for findone_or_create
. Check Documenter's build log for details.
Missing docstring for to_models
. Check Documenter's build log for details.
Missing docstring for to_model
. Check Documenter's build log for details.
Missing docstring for to_model!!
. Check Documenter's build log for details.
Missing docstring for to_select_part
. Check Documenter's build log for details.
Missing docstring for to_from_part
. Check Documenter's build log for details.
Missing docstring for to_where_part
. Check Documenter's build log for details.
Missing docstring for to_order_part
. Check Documenter's build log for details.
Missing docstring for to_group_part
. Check Documenter's build log for details.
Missing docstring for to_limit_part
. Check Documenter's build log for details.
Missing docstring for to_offset_part
. Check Documenter's build log for details.
Missing docstring for to_having_part
. Check Documenter's build log for details.
Missing docstring for to_join_part
. Check Documenter's build log for details.
SearchLight.columns_from_joins
— Functioncolumnsfromjoins(joins::Vector{SQLJoin})::Vector{SQLColumn}
Extracts columns from joins param and adds to be used for the SELECT part
Missing docstring for column_data_to_column_name
. Check Documenter's build log for details.
Missing docstring for prepare_column_name
. Check Documenter's build log for details.
Missing docstring for columns_names_by_table
. Check Documenter's build log for details.
Missing docstring for dataframes_by_table
. Check Documenter's build log for details.
Missing docstring for to_find_sql
. Check Documenter's build log for details.
Missing docstring for to_fetch_sql
. Check Documenter's build log for details.
Missing docstring for to_store_sql
. Check Documenter's build log for details.
Missing docstring for to_sqlinput
. Check Documenter's build log for details.
Missing docstring for delete_all
. Check Documenter's build log for details.
Missing docstring for deleteall
. Check Documenter's build log for details.
Missing docstring for delete
. Check Documenter's build log for details.
Missing docstring for query
. Check Documenter's build log for details.
Missing docstring for clone
. Check Documenter's build log for details.
Missing docstring for columns
. Check Documenter's build log for details.
Missing docstring for ispersisted
. Check Documenter's build log for details.
Missing docstring for column_field_name
. Check Documenter's build log for details.
Missing docstring for persistable_fields
. Check Documenter's build log for details.
Missing docstring for settable_fields
. Check Documenter's build log for details.
Missing docstring for table
. Check Documenter's build log for details.
Missing docstring for pk
. Check Documenter's build log for details.
Missing docstring for primary_key_name
. Check Documenter's build log for details.
Missing docstring for strip_table_name
. Check Documenter's build log for details.
Missing docstring for is_fully_qualified
. Check Documenter's build log for details.
Missing docstring for from_fully_qualified
. Check Documenter's build log for details.
Missing docstring for strip_module_name
. Check Documenter's build log for details.
Missing docstring for to_fully_qualified
. Check Documenter's build log for details.
Missing docstring for to_sql_column_names
. Check Documenter's build log for details.
Missing docstring for to_sql_column_name
. Check Documenter's build log for details.
Missing docstring for to_fully_qualified_sql_column_names
. Check Documenter's build log for details.
Missing docstring for fo_fully_qualified_sql_column_name
. Check Documenter's build log for details.
Missing docstring for from_literal_column_name
. Check Documenter's build log for details.
Missing docstring for to_dict
. Check Documenter's build log for details.
Missing docstring for to_string_dict
. Check Documenter's build log for details.
Missing docstring for enclosure
. Check Documenter's build log for details.
Missing docstring for update_query_part
. Check Documenter's build log for details.
SearchLight.escape_column_name
— Functionescape_column_name(c::SQLColumn) :: SQLColumn
escape_column_name(s::String)
Sanitizes input to be use as column names in SQL queries.
SearchLight.escape_value
— Functionescape_value(i::SQLInput)
Sanitizes input to be used as values in SQL queries.
Missing docstring for index_name
. Check Documenter's build log for details.
Missing docstring for sql
. Check Documenter's build log for details.
SearchLight.add_quotes
— Functionadd_quotes(str::String) :: String
Adds quotes around str
and escapes any previously existing quotes.
SearchLight.strip_quotes
— Functionstrip_quotes(str::String) :: String
Unquotes str
.
SearchLight.isquoted
— Functionisquoted(str::String) :: Bool
Checks weather or not str
is quoted.
SearchLight.expand_nullable
— Functionexpand_nullable{T}(value::Union{Nothing,T}, default::T) :: T
Returns value
if it is not nothing
- otherwise default
.
Core.NamedTuple
— TypeNamedTuple
NamedTuple
s are, as their name suggests, named Tuple
s. That is, they're a tuple-like collection of values, where each entry has a unique name, represented as a Symbol
. Like Tuple
s, NamedTuple
s are immutable; neither the names nor the values can be modified in place after construction.
Accessing the value associated with a name in a named tuple can be done using field access syntax, e.g. x.a
, or using getindex
, e.g. x[:a]
or x[(:a, :b)]
. A tuple of the names can be obtained using keys
, and a tuple of the values can be obtained using values
.
Iteration over NamedTuple
s produces the values without the names. (See example below.) To iterate over the name-value pairs, use the pairs
function.
The @NamedTuple
macro can be used for conveniently declaring NamedTuple
types.
Examples
julia> x = (a=1, b=2)
(a = 1, b = 2)
julia> x.a
1
julia> x[:a]
1
julia> x[(:a,)]
(a = 1,)
julia> keys(x)
(:a, :b)
julia> values(x)
(1, 2)
julia> collect(x)
2-element Vector{Int64}:
1
2
julia> collect(pairs(x))
2-element Vector{Pair{Symbol, Int64}}:
:a => 1
:b => 2
In a similar fashion as to how one can define keyword arguments programmatically, a named tuple can be created by giving a pair name::Symbol => value
or splatting an iterator yielding such pairs after a semicolon inside a tuple literal:
julia> (; :a => 1)
(a = 1,)
julia> keys = (:a, :b, :c); values = (1, 2, 3);
julia> (; zip(keys, values)...)
(a = 1, b = 2, c = 3)
As in keyword arguments, identifiers and dot expressions imply names:
julia> x = 0
0
julia> t = (; x)
(x = 0,)
julia> (; t.x)
(x = 0,)
Implicit names from identifiers and dot expressions are available as of Julia 1.5.
Use of getindex
methods with multiple Symbol
s is available as of Julia 1.7.