jli  Linuxx86_641.10.3v1.10.30b4590a5507d3f3046e5bafc007cacbbfc9b310b4%yDataAPIm/F]CA6X0/opt/julia/packages/DataAPI/atdEM/src/DataAPI.jlAXCoremуJ5Basemу]J5MainmуJ5ArgToolsBń x(mуF K5 Artifactsmr-V3|mу K5Base64UlD*_mу> K5CRC32c\y.jmуj K5 FileWatchingXzsy`{,zmуh& K5LibdluVW59˗,mу-" K5LoggingT{VhUXM=mуrU" K5MmapP~:xg,Omу|' K5NetworkOptionsC0YW,mуʠ, K5SHAQ<$!<%mу1 K5 Serialization [)*k1mу-G K5Sockets1V$ bdސݗmуYBY K5UnicodeP>I>Nrmуeszo K5 LinearAlgebraSm7̏mуuux K5 OpenBLAS_jll[(Śb6EcQ FmуDux K5libblastrampoline_jllLSۆ }lxӠmу^} K5MarkdownZPn7z`smу/Ed~ K5Printfg^cX׸QDmу;h K5Random_ɢ?\Ymу? K5TarOi>աmу!t, K5DatesEY8pj2 mуX K5FuturebS;3{I xVMmуsD K5InteractiveUtilsWL ~@'ZmуVg K5LibGit2Z[&RPTv3EКRmу8J K5 LibGit2_jll YXg}]$mуD K5 MbedTLS_jllAX 3ȡ_mу- K5 LibSSH2_jlloTZk)߆ using DataAPI julia> DataAPI.Between(:a, :e) .=> sin DataAPI.BroadcastedSelector{DataAPI.Between{Symbol, Symbol}}(DataAPI.Between{Symbol, Symbol}(:a, :e)) => sin julia> DataAPI.Cols(r"x") .=> [sum, prod] 2-element Vector{Pair{DataAPI.BroadcastedSelector{DataAPI.Cols{Tuple{Regex}}}, _A} where _A}: DataAPI.BroadcastedSelector{DataAPI.Cols{Tuple{Regex}}}(DataAPI.Cols{Tuple{Regex}}((r"x",))) => sum DataAPI.BroadcastedSelector{DataAPI.Cols{Tuple{Regex}}}(DataAPI.Cols{Tuple{Regex}}((r"x",))) => prod ``` """ struct BroadcastedSelector{T} sel::T BroadcastedSelector(sel) = new{typeof(sel)}(sel) end Base.Broadcast.broadcastable(x::Between) = Ref(BroadcastedSelector(x)) Base.Broadcast.broadcastable(x::All) = Ref(BroadcastedSelector(x)) Base.Broadcast.broadcastable(x::Cols) = Ref(BroadcastedSelector(x)) """ unwrap(x) For a given scalar argument `x`, potentially "unwrap" it to return the base wrapped value. Useful as a generic API for wrapper types when the original value is needed. The default definition just returns `x` itself, i.e. no unwrapping is performned. This generic function is owned by DataAPI.jl itself, which is the sole provider of the default definition. """ function unwrap end unwrap(x) = x # The database-style join methods for tabular data type. # The common interface is `*join(x, y; ...)` and use the keyword arguments # for the join criteria. # See the design of DataFrames.jl also. function innerjoin end function outerjoin end function rightjoin end function leftjoin end function semijoin end function antijoin end function crossjoin end """ nrow(t) Return the number of rows of table `t`. """ function nrow end """ ncol(t) Return the number of columns of table `t`. """ function ncol end """ allcombinations(sink, ...) Create table from all combinations of values in passed arguments using a `sink` function to materialize the table. """ function allcombinations end const STYLE_INFO = """ One of the uses of the metadata `style` is decision how the metadata should be propagated when `x` is transformed. This interface defines the `:default` style that indicates that metadata should not be propagated under any operations (it is only preserved when a copy of the source table is performed). All types supporting metadata allow at least this style. """ const COL_INFO = """ `col` must have a type that is supported by table `x` for column indexing. Following the Tables.jl contract `Symbol` and `Int` are always allowed. Throw an error if `col` is not a column of `x`. """ """ metadatasupport(T::Type) Return a `NamedTuple{(:read, :write), Tuple{Bool, Bool}}` indicating whether values of type `T` support metadata. The `read` field indicates whether reading metadata with the [`metadata`](@ref) and [`metadatakeys`]](@ref) functions is supported. The `write` field indicates whether modifying metadata with the [`metadata!`](@ref), [`deletemetadata!`](@ref), and [`emptymetadata!`](@ref) functions is supported. """ metadatasupport(::Type) = (read=false, write=false) """ colmetadatasupport(T::Type) Return a `NamedTuple{(:read, :write), Tuple{Bool, Bool}}` indicating whether values of type `T` support column metadata. The `read` field indicates whether reading metadata with the [`colmetadata`](@ref) and [`colmetadatakeys`](@ref) functions is supported. The `write` field indicates whether modifying metadata with the [`colmetadata!`](@ref), [`deletecolmetadata!`](@ref), and [`emptycolmetadata!`](@ref) functions is supported. """ colmetadatasupport(::Type) = (read=false, write=false) """ metadata(x, key::AbstractString, [default]; style::Bool=false) Return metadata value associated with object `x` for key `key`. Throw an error if `x` does not support reading metadata or does not have a mapping for `key`. If `style=true` return a tuple of metadata value and metadata style. Metadata style is an additional information about the kind of metadata that is stored for the `key`. $STYLE_INFO If `default` is passed then return it if reading metadata is supported but mapping for `key` is missing. If `style=true` return `(default, :default)`. """ function metadata end """ metadata(x; style::Bool=false) Return a dictionary mapping all metadata keys to metadata values associated with object `x`. Throw an error if `x` does not support reading metadata. If `style=true` values are tuples of metadata value and metadata style. Metadata style is an additional information about the kind of metadata that is stored for the `key`. $STYLE_INFO The returned dictionary may be freshly allocated on each call to `metadata` and is considered to be owned by `x` so it must not be modified. """ function metadata(x::T; style::Bool=false) where {T} if !metadatasupport(T).read throw(ArgumentError("Objects of type $T do not support reading metadata")) end return Dict(key => metadata(x, key, style=style) for key in metadatakeys(x)) end """ metadatakeys(x) Return an iterator of metadata keys for which `metadata(x, key)` returns a metadata value. Throw an error if `x` does not support reading metadata. """ function metadatakeys end """ metadata!(x, key::AbstractString, value; style::Symbol=:default) Set metadata for object `x` for key `key` to have value `value` and style `style` (`:default` by default) and return `x`. Throw an error if `x` does not support setting metadata. $STYLE_INFO """ function metadata! end """ deletemetadata!(x, key::AbstractString) Delete metadata for object `x` for key `key` and return `x` (if metadata for `key` is not present do not perform any action). Throw an error if `x` does not support metadata deletion. """ function deletemetadata! end """ emptymetadata!(x) Delete all metadata for object `x`. Throw an error if `x` does not support metadata deletion. """ function emptymetadata! end """ colmetadata(x, col, key::AbstractString, [default]; style::Bool=false) Return metadata value associated with table `x` for column `col` and key `key`. Throw an error if `x` does not support reading metadata for column `col` or `x` supports reading metadata, but does not have a mapping for column `col` for `key`. $COL_INFO If `style=true` return a tuple of metadata value and metadata style. Metadata style is an additional information about the kind of metadata that is stored for the `key`. $STYLE_INFO If `default` is passed then return it if `x` supports reading metadata and has column `col` but mapping for `key` is missing. If `style=true` return `(default, :default)`. """ function colmetadata end """ colmetadata(x, [col]; style::Bool=false) If `col` is not passed return a dictionary mapping columns represented as `Symbol` that have associated metadata to dictionaries mapping all metadata keys to metadata values associated with table `x` for a given column. If `col` is passed return a dictionary mapping all column metadata keys to metadata values associated with column `col` of table `x`. Throw an error if `x` does not support reading metadata for column `col` or column `col` is not present in `x`. If `style=true` values are tuples of metadata value and metadata style. Metadata style is an additional information about the kind of metadata that is stored for the `key`. $STYLE_INFO The returned dictionary may be freshly allocated on each call to `colmetadata` and is considered to be owned by `x` so it must not be modified. """ function colmetadata(x::T, col; style::Bool=false) where {T} if !colmetadatasupport(T).read throw(ArgumentError("Objects of type $T do not support reading column metadata")) end return Dict(key => colmetadata(x, col, key, style=style) for key in colmetadatakeys(x, col)) end function colmetadata(x::T; style::Bool=false) where {T} if !colmetadatasupport(T).read throw(ArgumentError("Objects of type $T do not support reading column metadata")) end return Dict(col => Dict(key => colmetadata(x, col, key, style=style) for key in keys) for (col, keys) in colmetadatakeys(x)) end """ colmetadatakeys(x, [col]) If `col` is passed return an iterator of metadata keys for which `metadata(x, col, key)` returns a metadata value. Throw an error if `x` does not support reading column metadata or if `col` is not a column of `x`. `col` must have a type that is supported by table `x` for column indexing. Following the Tables.jl contract `Symbol` and `Int` are always allowed. If `col` is not passed return an iterator of `col => colmetadatakeys(x, col)` pairs for all columns that have metadata, where `col` are `Symbol`. If `x` does not support column metadata return `()`. """ function colmetadatakeys end """ colmetadata!(x, col, key::AbstractString, value; style::Symbol=:default) Set metadata for table `x` for column `col` for key `key` to have value `value` and style `style` (`:default` by default) and return `x`. Throw an error if `x` does not support setting metadata for column `col`. $COL_INFO $STYLE_INFO """ function colmetadata! end """ deletecolmetadata!(x, col, key::AbstractString) Delete metadata for table `x` for column `col` for key `key` and return `x` (if metadata for `key` is not present do not perform any action). Throw an error if `x` does not support metadata deletion for column `col`. """ function deletecolmetadata! end """ emptycolmetadata!(x, [col]) Delete all metadata for table `x` for column `col`. If `col` is not passed delete all column level metadata for table `x`. Throw an error if `x` does not support metadata deletion for column `col`. """ function emptycolmetadata! end """ rownumber(row) Return the row number of `row` in the source table. """ function rownumber end # To avoid type piracy and method ambiguities, implementations of `groupby` # must restrict the first argument to a type defined in the same package. function groupby end end # module (ؙK