Jose Afonso
Jose Afonso

Reputation: 95

Couchbase schema validation

I am new to Couchbase.

I know that couchbase is schemaless, as it is MongoDB. I also saw that with MongoDB 3.6 there is a validationSchema, where we can tell an attribute it's data type.

I want to know if is it possible to in Couchbase 5, when creating a document insert the data type of that field, as in it is String, boolean, integer, etc...

Upvotes: 2

Views: 711

Answers (1)

Matthew Groves
Matthew Groves

Reputation: 26169

This is not something that Couchbase currently offers. It is a feature that has been requested, and is in the backlog (See MB-28024, for instance).

One reason why Mongo can offer this is that while Couchbase uses pure JSON to store documents, MongoDB uses the "BSON" format. So, you can't export Mongo data to JSON directly, for instance. Instead you end up with "Extended JSON"

Upvotes: 1

Related Questions