Skip to content
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

Table engine #90

Closed
metasean opened this issue Aug 26, 2015 · 4 comments
Closed

Table engine #90

metasean opened this issue Aug 26, 2015 · 4 comments
Milestone

Comments

@metasean
Copy link
Collaborator

Support "table" objects in gun. These would be part of a SQL extension, but would be available for any tabular objects.

Each table has two meta objects:

  • schema (see Schema #89 )
  • header
    • first - reference to first object's soul
    • last - reference to last object's soul
    • total - count of all objects ever in the table
    • active - count of active objects in the table

Each field in the table would need to be named according to the schema.

Each entry in the table has an additional boolean meta property of "deleted".

Example:

{ meta: {
    schema: { 
        A: { name: 'first-name', type: 'string', val: 'string at least 3 chars no more than 21 chars' } 
        A: { name: 'date-of-birth', type: 'date' } 
   },
    first: {'#': 'ASDF' },
    last: {'#': 'FADS' },
    total: 3,
    active: 2
   },
   ASDF: { A: 'Bob', B: '345678098765', deleted: 'false' },
   FDSA: { A: 'Dan', B: '987654456789', deleted: 'true' },
   FADS: { A: 'Amy', B: '765874890086', deleted: 'false' }
}

The scheme does not need to be embedded in the metadata, it can be by reference.

@metasean metasean added this to the 0.5.0 milestone Aug 26, 2015
@RangerMauve
Copy link

Would it maybe make sense to have this be a plugin or some wrapper over the core features of gun?

@metasean
Copy link
Collaborator Author

Yes, this will be an extension that will need to be explicitly called.

@amark
Copy link
Owner

amark commented Aug 27, 2015

@RangerMauve +1, yes absolutely. It won't work unless you (as @metasean mentions) explicitly install and include such modules/wrapper/extension/files/etc. I'm replying to your other post (still have to reply to your other ones from last week) with an example on how to create an extension. :) Expect it soon! Thanks again.

@metasean
Copy link
Collaborator Author

metasean commented Jan 4, 2016

Moved from core repo to extensions repo. See gundb/feature-requests#12 for details.

@metasean metasean closed this as completed Jan 4, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants