On Tue, Jun 03, 2008 at 02:27:01PM -0600, Dennis Cote scratched on the wall:
> Jay A. Kreibich wrote:
> >
> > That, or something like sqlite3_clear_bindings() that actually
> > *clears* the bindings (e.g. whatever state they are in just after a
> > prepare), and not just sets them to an explicit
On Tue, Jun 3, 2008 at 5:09 PM, Alex Katebi <[EMAIL PROTECTED]> wrote:
> It would be nice to be able to revert back to the default value for a
> column. I don't think SQLite support this right now.
> The closest thing I found is "pragma table_info(foo)". If you prepare this
> and then grab the dfl
It would be nice to be able to revert back to the default value for a
column. I don't think SQLite support this right now.
The closest thing I found is "pragma table_info(foo)". If you prepare this
and then grab the dflt_value for your column.
On Tue, May 20, 2008 at 2:33 PM, Jeff Hamilton <[EMAIL
Jay A. Kreibich wrote:
>
> That, or something like sqlite3_clear_bindings() that actually
> *clears* the bindings (e.g. whatever state they are in just after a
> prepare), and not just sets them to an explicit NULL, as the current
> function does.
>
Jay,
That wouldn't help. The default
On Tue, Jun 03, 2008 at 02:51:57PM -0500, Jeff Hamilton scratched on the wall:
> On Tue, May 20, 2008 at 2:56 PM, D. Richard Hipp <[EMAIL PROTECTED]> wrote:
> > OK. How about:
> >
> > INSERT INTO foo(bar) VALUES(coalesce(?,'default-value'));
>
> This approach is working well for us, but as De
On Tue, May 20, 2008 at 2:56 PM, D. Richard Hipp <[EMAIL PROTECTED]> wrote:
> OK. How about:
>
> INSERT INTO foo(bar) VALUES(coalesce(?,'default-value'));
This approach is working well for us, but as Dennis pointed out it
won't work for all situations. I wonder if it's worth adding something
Eric Minbiole wrote:
>> I have a table like this
>>
>> CREATE TABLE foo (bar TEXT NOT NULL DEFAULT 'default_value');
>>
>> and I'd like to create a reusable statement to do inserts into foo, like
>> this:
>>
>> INSERT INTO foo (bar) VALUES (?);
>>
>> Sometimes I have values for bar and sometimes I
On May 20, 2008, at 3:40 PM, Jeff Hamilton wrote:
> This works in the simple case that I described, but in practice I'd
> like to use the pattern on more complex tables that have existing
> uniqueness constraints. Using REPLACE INTO will get in the way of
> those constraints.
>
OK. How about:
This works in the simple case that I described, but in practice I'd
like to use the pattern on more complex tables that have existing
uniqueness constraints. Using REPLACE INTO will get in the way of
those constraints.
Regarding multiple statements, the tables I'd like to use this pattern
on have
> I have a table like this
>
> CREATE TABLE foo (bar TEXT NOT NULL DEFAULT 'default_value');
>
> and I'd like to create a reusable statement to do inserts into foo, like this:
>
> INSERT INTO foo (bar) VALUES (?);
>
> Sometimes I have values for bar and sometimes I don't and want the
> default.
On Tue, May 20, 2008 at 11:33:04AM -0700, Jeff Hamilton scratched on the wall:
> Hi all,
>
> I have a table like this
>
> CREATE TABLE foo (bar TEXT NOT NULL DEFAULT 'default_value');
>
> and I'd like to create a reusable statement to do inserts into foo, like this:
>
> INSERT INTO foo (bar) VA
On May 20, 2008, at 2:33 PM, Jeff Hamilton wrote:
> Hi all,
>
> I have a table like this
>
> CREATE TABLE foo (bar TEXT NOT NULL DEFAULT 'default_value');
>
> and I'd like to create a reusable statement to do inserts into foo,
> like this:
>
> INSERT INTO foo (bar) VALUES (?);
>
> Sometimes I h
Hi all,
I have a table like this
CREATE TABLE foo (bar TEXT NOT NULL DEFAULT 'default_value');
and I'd like to create a reusable statement to do inserts into foo, like this:
INSERT INTO foo (bar) VALUES (?);
Sometimes I have values for bar and sometimes I don't and want the
default. Is there a
13 matches
Mail list logo