On Thu, Oct 9, 2014 at 9:00 AM, wrote:
> Message: 6
> Date: Wed, 8 Oct 2014 14:40:57 -0500
> From: Nico Williams
> To: General Discussion of SQLite Database
> Subject: Re: [sqlite] Detecting multiple CHECK failures
> Message-ID:
> <
> cak3ofogmmurc0fmnterh
On Wed, 08 Oct 2014 15:01:39 +0200
Clemens Ladisch wrote:
> SQL constraints were designed to catch _programming_ errors, not
> _user_ errors.
Neither and both, actually. Database theory doesn't distinguish between
different sources of invalid input.
Constraints enforce consistency. They prev
On Wed, Oct 8, 2014 at 8:01 AM, Clemens Ladisch wrote:
> Peter Haworth wrote:
>> I'm a great believer in using CHECK constraints to do as much validation as
>> possible within the database rather than code it in my application.
>>
>> However, I think I'm right in saying that as soon as a CHECK con
On Wed, Oct 8, 2014 at 12:23 PM, Peter Haworth wrote:
> Actually, I do get the CHECK constraint name returned to me in the error
> message otherwise, as you say, it would be impossible to find out what
> failed.
>
> I use a translation table in my application to reformat the SQLite error
> message
Hi Simon,
Actually, I do get the CHECK constraint name returned to me in the error
message otherwise, as you say, it would be impossible to find out what
failed.
I use a translation table in my application to reformat the SQLite error
message to a more suitable format to present to my users based
Peter Haworth wrote:
> I'm a great believer in using CHECK constraints to do as much validation as
> possible within the database rather than code it in my application.
>
> However, I think I'm right in saying that as soon as a CHECK constraint
> fails, an error is returned to my application so no
Hello,
I think that SQLite reports the first constraint which fails:
http://sqlite.org/changes.html
2012-05-14 (3.7.12)
Report the name of specific CHECK constraints that fail.
sqlite> CREATE TABLE test (data TEXT CONSTRAINT notEmpty CHECK
(length(data) > 0));
sqlite> INSERT INTO test VALUES ('')
On 7 Oct 2014, at 10:00pm, Peter Haworth wrote:
> I'm a great believer in using CHECK constraints to do as much validation as
> possible within the database rather than code it in my application.
>
> However, I think I'm right in saying that as soon as a CHECK constraint
> fails, an error is re
I'm a great believer in using CHECK constraints to do as much validation as
possible within the database rather than code it in my application.
However, I think I'm right in saying that as soon as a CHECK constraint
fails, an error is returned to my application so no other CHECK constraints
are ex
9 matches
Mail list logo