Are you finished reading data and ready to release the lock you acquired on the
database?
pysqlite in full automagic mode (the default) will magically start a
transaction for you when you execute any statement. It will automatically
commit the transaction after a DML statement (CREATE/DROP).
Um, do a commit after I do db.fetchone()?
Mark
On Wednesday, October 08, 2014 07:26:01 PM Keith Medcalf wrote:
> If you are not using explicit transactions are comitting them ... even agter
> a read to release the locks?
>
>
> Sent from Samsung Mobile
>
> Original message
If you are not using explicit transactions are comitting them ... even agter a
read to release the locks?
Sent from Samsung Mobile
Original message From: Mark Halegua
Date:2014-10-08 16:12 (GMT-07:00)
To: General Discussion of SQLite Database
On Wed, 8 Oct 2014 00:14:51 -0400
Stephen Chrzanowski wrote:
> When adding a NULL value to a table that has the NOT NULL flag set on
> that field, instead of raising an exception, if the field definition
> were to have the word "USE" between "ON CONFLICT" and "DEFAULT" in
>
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
On Wed, Oct 8, 2014 at 1:47 PM, Alek Gembinski
wrote:
> Specifically I need this exact flavor of SQLite (3.7.16.2)?
>
Why? What's wrong with 3.8.6?
>
> I do see it mentioned on this page:
>
> http://www.sqlite.org/changes.html
>
> but I don't see any steps for
Specifically I need this exact flavor of SQLite (3.7.16.2)?
I do see it mentioned on this page:
http://www.sqlite.org/changes.html
but I don't see any steps for using this info:
* SQLITE_SOURCE_ID: "2013-04-12 11:52:43
cbea02d93865ce0e06789db95fd9168ebac970c7"
* SHA1 for sqlite3.c:
On Wed, 08 Oct 2014 17:45:29 -0400, Mark Halegua
wrote:
> I have an application I'm using sqlite3 as the database for. The program is
> designed to
> view and add/edit information. The viewing part is set up and working nicely
> using pysqlite
> and wxpython.
>
>
On Wednesday, October 08, 2014 11:04:33 PM Simon Slavin wrote:
> On 8 Oct 2014, at 10:45pm, Mark Halegua wrote:
> > I think my problem is I've opened the database in different modules for
> > different views of the data (there are six tables, one of which relates
> > to
On 8 Oct 2014, at 10:45pm, Mark Halegua wrote:
> I think my problem is I've opened the database in different modules for
> different views of the
> data (there are six tables, one of which relates to two/three others, another
> which relates to
> one other) and
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
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
On Oct 8, 2014, at 8:51 PM, Stephen Chrzanowski wrote:
> If the field def'n were to be changed to [ col2 NUMBER DEFAULT ON NULL 0 ]
> and then when I insert/update something that becomes NULL and the result
> becomes 0 for that field, then yeah, bingo.
Yep, that’s exactly
If the field def'n were to be changed to [ col2 NUMBER DEFAULT ON NULL 0 ]
and then when I insert/update something that becomes NULL and the result
becomes 0 for that field, then yeah, bingo.
On Wed, Oct 8, 2014 at 2:14 PM, Petite Abeille
wrote:
>
> On Oct 8, 2014, at
On Oct 8, 2014, at 6:14 AM, Stephen Chrzanowski wrote:
> When adding a NULL value to a table that has the NOT NULL flag set on that
> field, instead of raising an exception, if the field definition were to
> have the word "USE" between "ON CONFLICT" and "DEFAULT" in its
On 2014-10-07, 4:04 PM, Dan Kennedy wrote:
On 10/08/2014 01:52 AM, Sohail Somani wrote:
Figured it out: match terms should be "l0l* h4x*" NOT "*l0l* *h4x*",
though it did work as expected with the older version. I'd suggest
keeping the old behaviour unless there is a performance-based reason
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
Hi,
> It can even compare two fields in the same row and test one against the other
> so you can, for example, make sure you don't have any people who are both
> male and pregnant.
Actually, this restriction could be problematic:
https://en.wikipedia.org/wiki/Transgender_pregnancy
Best
On 8 Oct 2014, at 1:22pm, Stephen Chrzanowski wrote:
> Can one not also put a constraint up on the field to say that the field can
> only be of a certain value, kind of to emulate ENUM?
Sure you can. You can do anything expressible in SQL which turns into a
BOOLEAN
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
On Wed, Oct 8, 2014 at 1:26 AM, Simon Slavin wrote:
>
> You could probably use a TRIGGER that detects the type of row you don't
> want and replaces it with your preferred form. This doesn't do exactly
> what you want, but it is something like it.
>
>
That'd work, but extra
Hello Anand,
the syntax diagram at https://www.sqlite.org/lang_altertable.html shows
that an alter table statement for sqlite can contain "add column" only once.
I myself came against that fact when porting my DDL statements from
PostgreSQL to SQLite.
So, the answer is "you can't".
Martin
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
ALTER TABLE Data ADD COLUMN Password TEXT ;ALTER TABLE Data ADD COLUMN
Password1 TEXT
--
View this message in context:
http://sqlite.1065341.n5.nabble.com/how-to-add-multiple-columns-at-a-time-tp43355p78465.html
Sent from the SQLite mailing list archive at Nabble.com.
ALTER TABLE "main"."tblCredit" ADD COLUMN "CardDetail" VARCHAR;ALTER TABLE
"main"."tblCredit" ADD COLUMN "CardDetail1" VARCHAR;
--
View this message in context:
http://sqlite.1065341.n5.nabble.com/how-to-add-multiple-columns-at-a-time-tp43355p78464.html
Sent from the SQLite mailing list
25 matches
Mail list logo