metabench / nextleveldb-server

MIT License
1 stars 0 forks source link

No unique fields / unique field constraints #3

Open metabench opened 6 years ago

metabench commented 6 years ago

Fields do not have data on if they are unique stored in the DB.

The DB has already been used for a variety of fields that have been used as unique, but they have not had a unique constraint or any overwrite protection.

Knowing if a field is unique also tells us if we should be able to retrieve multiple records on a field lookup.

Suggestion:

Have 'field constraints' table. Begin implementation of the unique constraint.

metabench commented 6 years ago

Removed from source code

// Could use the type id to represent if the field is unique as well as the type. // if type_id > 128 subtract 128 and say it's a unique field. // This lack of unique field status is a challenge right now. // don't want to assume all indexed fields have to be unique.

// Getting unique fields (and unique indexes) right seems important. // The distinction between unique and non-unique indexes.