From my understanding of Length(), it still reads the
entire Blob into memory before getting its size ( please
correct me if I am wrong ).
Many have suggested, that the best approach is to have
your application restrict the size of the blobs that it
writes to a size that is good for you. You can
On 10/31/05, Joe Wilson <[EMAIL PROTECTED]> wrote:
> [...] But if
> for some reason you absolutely must need to know the number of bytes
> that a text or blob value takes from within the Sqlite SQL language,
> just refer to the documentation of typeof(), CAST, CASE and quote()
> and you can come up
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 r
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
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 d
--- 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 noticin
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 return
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
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 with
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 with the blob when you write it
;, CallingConvention=CallingConvention.Cdecl)]
internal static extern Int32 sqlite3_column_bytes(IntPtr statementhandle,
Int32 column);
Rob
- Original Message -
From: "Lloyd Dupont" <[EMAIL PROTECTED]>
To:
Sent: Sunday, October 23, 2005 3:46 PM
Subject: Re: [sqlite] built-in functri
Isn't this what you are looking for?
http://www.sqlite.org/capi3ref.html#sqlite3_column_bytes
" If the result is a BLOB then the sqlite3_column_bytes() routine returns
the number of bytes in that BLOB. "
Or do you really need it inside an SQL statement?
that's right!
I'm not using SQLite C A
riginal Message -
From: "Lloyd Dupont" <[EMAIL PROTECTED]>
To:
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 of a string (in a record
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 worthy
14 matches
Mail list logo