Comments (3)
probably at sd level, since type validation of inputs happens here.
eventually me might be able to shift more and more DB related stuff to stubdb...but for now it's wrapped up here.
from sirdb.
for now it's wrapped up here.
which is fine
from sirdb.
Stubdb can do indexes.
So when we create a table we can specify an index:[]
option, that lists properties that are to be indexed.
Then everytime we get a write action (newItem/setItem) what happens is this, the index directory is found
/<table_name>/_indexes/<property_name>
and the value of the property to be indexes is hashed, to give <value_hash>
and the file:
/<table_name>/_indexes/<property_name>/<value_hash>.json
is found or created. And the record id is added to the index record for that value. If there's a collision, the record also adds the collided value.
An index record looks like this:
{
[base64value]: [<record_ids>],
[base64value]: [<record_ids>],
}
so any collisions are handled like that.
Then in order to retrieve results for an index, we simply hash the value and get the index record, and we have the results right there.
from sirdb.
Related Issues (13)
- add green light functions HOT 1
- add ramdisk option for sirdb
- add ipfs as option for sirdb
- add btfs as option for sirdb
- add tsc checkjs HOT 1
- add .d.ts and get to work as a imported package HOT 4
- consider ceph as storage
- atomic writes
- Project Logo HOT 3
- Roadmap, acidity and transactions: consider this HOT 3
- Cool feature: index a list of values
- Add related projects section
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sirdb.