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

Adding constraints and field types #76

Open
bajahranks opened this issue Aug 30, 2022 · 0 comments
Open

Adding constraints and field types #76

bajahranks opened this issue Aug 30, 2022 · 0 comments

Comments

@bajahranks
Copy link

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 });

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant