Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Always uses extended errors for constraints.
In #5 the ErrCode return was fixed to always return the correct code. But the Error.Msg field remains empty. Returning the extended error allows checking for a named constraint. For example: CREATE TABLE IF NOT EXISTS users ( email text NOT NULL DEFAULT '', CONSTRAINT not_empty_email CHECK (email != '') ); Calling Step() with an empty value, returns the following Error.Msg: CHECK constraint failed: not_empty_email The extended error is useful in cases like form validation.
- Loading branch information