#OpenExpo18

Full stack developer and proud member of Open Source Weekends comunity

 

Open Source Ecosystem active collaborator

 

GoblinDB Co-Leader and Web Developer at CBI

Sebastián Cabanas

Ulises Gascón

Desarrollador Full Stack y orgulloso co-organizor de la comunidad Open Source Weekends (OSW)

 

Colaborador activo en la Comunidad Open Source

 

Trabaja como freelance, además de ser profesor en Fictizia.

Philosophy

Basics

Tansactions

Events

Ambush Functions

Success stories

Roadmap

Community

Philosophy

Basics

Quick Demo

+

Add it to your project

Install the package
Add it to your project

Configuration

- fileName
- pointerSymbol
- recordChanges
- mode
Basic Demo

Resume/Stop change recording 

Tansactions

Saving Data

You have many options to save data. As Goblin is a key/value database you need to know what is the key that you want to use/create.

  • set(key, data). Write or replace data to a defined key (optional)
  • push(data). Write data in a new key (random name added, like MewhnDIutVhm3hulgTaAJj6Utb47GOwe)
  • update(data, key). Add and modify data to a defined key

Retrieving Data

By default Goblin will create an empty json file as database storage, if the file exist it will added to Goblin.

  • get(key). return all data or data from a defined key (optional)
Database Content
Script content

Remove Data

By default Goblin will create an empty json file as database storage, if the file exist it will added to Goblin.

  • delete(key). Remove data from a defined key
  • truncate(data). Dump the database

Events

The event will return an object that contains previous data and current data. At the moment the the listeners can be added only to the database root

You can specify the trigger event:

  • add
  • update
  • delete
  • reconfigure
  • change (always it will be triggered)

You can use events in order to react to changes in the database. All the events are managed internally by Goblin inside as hooks.

We added .on() & .off() methods to manage the events.

Ambush Functions

You can store also anonymous functions in GoblinDB, we call this functions Ambush.

 

Once you add Ambush functions to GoblinDB... the system will save them under a .goblin file.

 

This feature will allow you to bring your functions together with your data to a new projects.

You can perform few basic operations to ambush functions through Goblin specific methods (similar to data ones...).  

  • add()
  • update()
  • remove()
  • run()
  • details()
  • list()

All the ambush functions has an specific setup. Internally they are objects with specific methods and properties

  • id, this reference must be unique and also a string.
  • description, this will add additional information about the current ambush function (opt & string)
  • category, this array will help us to filter our ambush functions.
  • action, this is the key feature. This method can be executed from GoblinDB on demand. Only two optional parameters are acepted: arguments (no specific data type) and callback (function).

Add an Ambush Function

Ambush Function + Arguments

ASYNC Ambush Function

Update an Ambush Function

Remove an Ambush Function

More...

Filter by details

More...

Ambush function in details

Success stories

Roadmap

  •  Support to chain methods. Issue 50
  •  Add Pugins system. Issue 12
  •  Plugin documentation example. Issue 56
  •  Add basic query methods as a plugin. Issue 54
  •  Add Avance query methods as a plugin. Issue 55
  •  Add support to .once() method for events. Issue 51
  •  Add support to UID in events. Issue 53
  •  Add additional support to Backup Goblin with other databases like Firebase, Mongo... in real time as a plugin. Issue 52

Community

Contribute

Questions

¡Thank U!

Dreams are extremely important. You can't do it unless you imagine it.  

- George Lucas