https://github.com/brianneisler/firedex
Javascript based ORM and security rules for firebase
https://github.com/brianneisler/firedex
Last synced: 4 months ago
JSON representation
Javascript based ORM and security rules for firebase
- Host: GitHub
- URL: https://github.com/brianneisler/firedex
- Owner: brianneisler
- License: apache-2.0
- Created: 2017-11-26T17:21:44.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-05-13T23:33:57.000Z (about 7 years ago)
- Last Synced: 2025-01-20T09:27:04.450Z (5 months ago)
- Language: JavaScript
- Size: 235 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# firedex - Functionally driven object modeling framework for Firebase's realtime database
This library offers a simpler and more familiar way of using firebase's realtime database.
## Features
- provides a mechanism for declaring schemas to use with the firebase realtime database
- allows for multi removal, set and updates to paths in the firebase Realtime database
- allows for querying for and finding values using more than one condition ( where x = value AND y = otherValue )
- offers a better mechanism for expressing firebase security rules and automatically converts the Schema to matching rules
- allows for securely exposing indexed fields on a value while not exposing the entire value
- allows for a simpler mechanism for performing updates on multiple values
- offers a method for populating queries with cross referenced schemas## Example
```js
// User.jsimport { defindex, defpath, extend } from 'firedex/schema'
import { Entity, String } from 'firedex/schemas'const User = extend(Entity, 'User', { // extends the built in type of Entity
path: defpath('/users/$id'),
props: {
username: String
},
indexes: [
defindex({
'username': defindex.ASC
}, {
unique: true // Defines this index as unique and prevents duplicates
})
]
})export default User
```# Documentation
## query methods
### create
TODO### find
TODO### findOne
TODO### generate
TODO### query
TODO### ref
TODO### remove
TODO### set
TODO### transaction
TODO### update
TODO## schema methods
### defindex
TODO### defn
TODO### defpath
TODO### defref
TODO### defschema
TODO### extend
TODO## types
### extend
TODO