Add and improve existing typespecs on BGP behaviour
This commit is contained in:
parent
49bcb27bb0
commit
1ca082cbb2
1 changed files with 11 additions and 3 deletions
|
@ -1,13 +1,21 @@
|
|||
defmodule RDF.Query.BGP do
|
||||
@moduledoc """
|
||||
An interface for various BGP algorithm implementations.
|
||||
An interface for various BGP matching algorithm implementations.
|
||||
"""
|
||||
|
||||
@type variable :: String.t
|
||||
@type triple_pattern :: {
|
||||
subject :: variable | RDF.Term.t,
|
||||
predicate :: variable | RDF.Term.t,
|
||||
object :: variable | RDF.Term.t
|
||||
}
|
||||
@type triple_patterns :: list(triple_pattern)
|
||||
@type solution :: map
|
||||
@type solutions :: [solution]
|
||||
|
||||
@callback query(triple_patterns :: [], data :: RDF.Data.t, opts :: Keyword.t) :: solutions
|
||||
|
||||
@callback query_stream(triple_patterns :: [], data :: RDF.Data.t, opts :: Keyword.t) :: Enumerable.t()
|
||||
@callback query(triple_patterns :: [], data :: RDF.Graph.t, opts :: Keyword.t) :: solutions
|
||||
|
||||
@callback query_stream(triple_patterns :: [], data :: RDF.Graph.t, opts :: Keyword.t) :: Enumerable.t()
|
||||
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue