Skip to content

Adding constraints and field types #76

@bajahranks

Description

@bajahranks

This examples states that the insert will fail if it has constraints on a field. I don't see where in the documentation that explains how to add constrains as well as setting the types for the field.

// If there is a unique constraint on field 'a', this will fail db.insert([{ a: 5 }, { a: 42 }, { a: 5 }], function (err) { // err is a 'uniqueViolated' error // The database was not modified });

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions