Re: [sqlite] built-in functrion suggestion: size of blob

2005-10-31 Thread Joe Wilson
Oops - the second paragraph should have read: "with appropriate manipulations of sqlite3_value_type(), sqlite3_value_bytes() and sqlite3_value_text()." --- Joe Wilson <[EMAIL PROTECTED]> wrote: > Length() is perfectly consistant with the value's type. As you've > demonstrated, Sqlite does not

Re: [sqlite] built-in functrion suggestion: size of blob

2005-10-31 Thread Joe Wilson
Length() is perfectly consistant with the value's type. As you've demonstrated, Sqlite does not respect the column types in tables as declared in the CREATE statement. Length(text_value) always returns the number of characters and length(blob_value) always returns the number of bytes. The type

Re: [sqlite] built-in functrion suggestion: size of blob

2005-10-31 Thread Nuno Lucas
On 10/28/05, Joe Wilson <[EMAIL PROTECTED]> wrote: > --- Nuno Lucas <[EMAIL PROTECTED]> wrote: > > On 10/25/05, Joe Wilson <[EMAIL PROTECTED]> wrote: > > > The built-in Sqlite length() function works just fine on blobs: > > > > > > sqlite> select length(X'00'); > > > 5 > > > > > > Why

Re: [sqlite] built-in functrion suggestion: size of blob

2005-10-28 Thread Joe Wilson
--- Nuno Lucas <[EMAIL PROTECTED]> wrote: > On 10/25/05, Joe Wilson <[EMAIL PROTECTED]> wrote: > > The built-in Sqlite length() function works just fine on blobs: > > > > sqlite> select length(X'00'); > > 5 > > > > Why do you think it doesn't? > > I remember a few months ago

Re: [sqlite] built-in functrion suggestion: size of blob

2005-10-26 Thread Nuno Lucas
On 10/25/05, Joe Wilson <[EMAIL PROTECTED]> wrote: > The built-in Sqlite length() function works just fine on blobs: > > sqlite> select length(X'00'); > 5 > > Why do you think it doesn't? I remember a few months ago noticing it would count UTF-8 chars, not bytes, so it would not

Re: [sqlite] built-in functrion suggestion: size of blob

2005-10-25 Thread Joe Wilson
The built-in Sqlite length() function works just fine on blobs: sqlite> select length(X'00'); 5 Why do you think it doesn't? --- Lloyd Dupont <[EMAIL PROTECTED]> wrote: > I look into the build in function of SQLite and saw there is a function to > know the length of a > string (in

Re: [sqlite] built-in functrion suggestion: size of blob

2005-10-24 Thread Dennis Cote
Kervin L. Pierre wrote: Lloyd Dupont wrote: But to my disbelief there is (apparently) no way to get the size of a blob (other than loading it :-() I'd like to be corrected if I am wrong, but I don't think there is anyway to do this in SQLite, besides simply storing the size of the blob

Re: [sqlite] built-in functrion suggestion: size of blob

2005-10-23 Thread Rob Lohman
Convention=CallingConvention.Cdecl)] internal static extern Int32 sqlite3_column_bytes(IntPtr statementhandle, Int32 column); Rob - Original Message - From: "Lloyd Dupont" <[EMAIL PROTECTED]> To: <sqlite-users@sqlite.org> Sent: Sunday, October 23, 2005 3:46 PM Subject: Re: [sqlit

Re: [sqlite] built-in functrion suggestion: size of blob

2005-10-23 Thread Rob Lohman
al Message - From: "Lloyd Dupont" <[EMAIL PROTECTED]> To: <sqlite-users@sqlite.org> Sent: Sunday, October 23, 2005 3:15 PM Subject: [sqlite] built-in functrion suggestion: size of blob I look into the build in function of SQLite and saw there is a function to know the length o

[sqlite] built-in functrion suggestion: size of blob

2005-10-23 Thread Lloyd Dupont
I look into the build in function of SQLite and saw there is a function to know the length of a string (in a record). Great! But to my disbelief there is (apparently) no way to get the size of a blob (other than loading it :-() And no, length() doesn't work on Blob. I think it would be a