Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
database: Add auto-create table(bucket) in BoltDB backend
This is in order to auto create tables in case they doesn't exist, it will only apply for the DbAdd method which will receive a tableID, a key and a value, we're infering that table must exist, this change make sure that that table is created. One the useful cases for this is in the ciao-image, which will dinamically require new tables(buckets) per tenant or project. It will automatically create the tenant's table when a new image is registered. When retrieving all key/value elements from a specific table(bucket), it will not create the table if it doesn't exist, it will return an empty array which means that there are no elements from that table. Signed-off-by: Obed N Munoz <[email protected]>
- Loading branch information