-
Notifications
You must be signed in to change notification settings - Fork 65
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Define the datascript integration points #10
Comments
For datascript we should implement a database. (defprotocol ISearch
(-search [data pattern]))
(defprotocol IIndexAccess
(-datoms [db index components])
(-seek-datoms [db index components])
(-index-range [db attr start end]))
(defprotocol IDB
(-schema [db])
(-attrs-by [db property])) are the main protocols, but they also implement a few more like |
I have some basic questions
|
Fressian is pretty good for datoms. |
@danboykis I'll reply to your 3 questions:
@kovasb I really like Fressian, but I prefer Nippy, because it's much easier to use, and it supports flexible compression and encryption stuff. |
@dgrnbrg As far as I can tell all that is required of datom type is that is it supports ILookup with :e :a :v :t :added as keys as well as a few more ancillary protocols. To make IKeyCompare monomorphic you would need a different type per index type :eavt :avet etc, because the result of the compare for the same datom will be different depending on the index it is in. This may be appropriate I am just making sure we are on the same page. |
@dspiteself I agree with that--I think it should help performance and have minimal code duplication, especially since there's a lot of flexibility in how we represent things under the hood for performance. |
In Datomic, it seems like
seek-datoms
is the only fundamental API that needs to be exposed to the query engine in order to calculate its answers. We need to decide what the API through which Datascript will interact with our code will be.Once this is done, we'll be able to implement some kind of transaction & query API based on the index manager module (see #11).
The text was updated successfully, but these errors were encountered: