[sqlite] Using incremental BLOB functions against a BLOB column in a virtual table

2015-02-25 Thread Dominique Devienne
On Wed, Feb 25, 2015 at 7:52 AM, Hick Gunter  wrote:

> And the "explain" output will contain virtual table opcodes
>

I use this technique to discover which tables and virtual tables a view
accesses (instead of trying to parse the query.)

I execute "explain select rowid from $viewname", and look for TableLock and
VOpen "opcode"s, and look at the "p4" column for table names and for
virtual tables, p4 contains vtab:module-hex-address:vtable-hex-address,
where module-hex-address is your sqlite3_module* in hexadecimal, and
vtable-address your sqlite3_vtab*, which typically you code can translate
to the vtable names. --DD


[sqlite] Using incremental BLOB functions against a BLOB column in a virtual table

2015-02-25 Thread Hick Gunter
Yes. The stored SQL string will contain the keyword "VIRTUAL".



asql> select sql from sqlite_master where name='sgb_dd_draw';

sql

-

CREATE VIRTUAL TABLE sgb_dd_draw USING Partition ( 
'sgbDrawDefPartitionDM-PARTITION_ACISQL.xml', sgb_dd_draw )



And the "explain" output will contain virtual table opcodes



asql> explain select jurisdiction_no, game_no from sgb_dd_draw limit 1;

addr  opcode p1p2p3p4 p5  comment

  -        -  --  -

?

3 VOpen  0 0 0 vtab:1D46D128:2B9BCF7769D0  00  NULL

..

6 VFilter0 122   00  NULL

7 VColumn0 0 400  
sgb_dd_draw.jurisdiction_no

8 VColumn0 1 500  sgb_dd_draw.game_no

?



-Urspr?ngliche Nachricht-
Von: Evans, Randall [mailto:REvans at seasoft.com]
Gesendet: Dienstag, 24. Februar 2015 20:18
An: sqlite-users at mailinglists.sqlite.org
Betreff: Re: [sqlite] Using incremental BLOB functions against a BLOB column in 
a virtual table



Thanks to Richard Hipp and Hick Gunter for their replies on this topic.



Given that support for support for BLOBs in virtual tables differs from that 
for BLOBs in physical tables, is there any method or function available to the 
sqlite3_x() caller that can be used to distinguish tables defined as 
virtual tables vs. physical tables?



Thanks in advance for any assistance provided.



Randy Evans



>

> From: Richard Hipp mailto:drh at sqlite.org>>

>

> On 2/23/15, Evans, Randall mailto:REvans at 
> seasoft.com>> wrote:

> > Can the incremental BLOB functions (sqlite_blob_open(),

> > sqlite_blob_read(),

> > etc) access BLOB column data defined in a SQLite virtual table? If

> > it matters, I am only interested in read-only access at this time.

>

> no.

>

> >

> > If the answer is yes, is there any facility in virtual table support

> > for xColumn or any other method that will expose to the virtual

> > table module the positioning/length values supplied as the 3rd and

> > 4th arguments of the

> > sqlite_blob_read() function (N bytes and offset values)?

>

> There would have to be, in order for incremental blob I/O to be

> supported on virtual tables.  The absence of such a method is one

> reason why the answer above is "no".

>

> >

> >

> > Randy Evans

___

sqlite-users mailing list

sqlite-users at mailinglists.sqlite.org<mailto:sqlite-users at 
mailinglists.sqlite.org>

http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users



___
Gunter Hick
Software Engineer
Scientific Games International GmbH
FN 157284 a, HG Wien
Klitschgasse 2-4, A-1130 Vienna,Austria
Tel: +43 1 80100 - 0
E-Mail: hick at scigames.at

This communication (including any attachments) is intended for the use of the 
intended recipient(s) only and may contain information that is confidential, 
privileged or legally protected. Any unauthorized use or dissemination of this 
communication is strictly prohibited. If you have received this communication 
in error, please immediately notify the sender by return e-mail message and 
delete all copies of the original communication. Thank you for your cooperation.


[sqlite] Using incremental BLOB functions against a BLOB column in a virtual table

2015-02-24 Thread Evans, Randall
Thanks to Richard Hipp and Hick Gunter for their replies on this topic.

Given that support for support for BLOBs in virtual tables differs from that 
for BLOBs in physical tables, is there any method or function available to the 
sqlite3_x() caller that can be used to distinguish tables defined as 
virtual tables vs. physical tables?

Thanks in advance for any assistance provided.

Randy Evans

> 
> From: Richard Hipp 
> 
> On 2/23/15, Evans, Randall  wrote:
> > Can the incremental BLOB functions (sqlite_blob_open(),
> > sqlite_blob_read(),
> > etc) access BLOB column data defined in a SQLite virtual table? If it
> > matters, I am only interested in read-only access at this time.
> 
> no.
> 
> >
> > If the answer is yes, is there any facility in virtual table support
> > for xColumn or any other method that will expose to the virtual table
> > module the positioning/length values supplied as the 3rd and 4th
> > arguments of the
> > sqlite_blob_read() function (N bytes and offset values)?
> 
> There would have to be, in order for incremental blob I/O to be supported
> on virtual tables.  The absence of such a method is one reason why the
> answer above is "no".
> 
> >
> >
> > Randy Evans


[sqlite] Using incremental BLOB functions against a BLOB column in a virtual table

2015-02-24 Thread Hick Gunter
Incremental BLOB I/O makes certain assertions that cannot be guaranteed (much 
less verified at runtime) for virtual tables (e.g. 1: unique rowids that 2: can 
be used for access) and needs to know how to read/write them (which is under 
the control of the virtual table author).

-Urspr?ngliche Nachricht-
Von: Evans, Randall [mailto:REvans at seasoft.com]
Gesendet: Dienstag, 24. Februar 2015 01:47
An: sqlite-users at mailinglists.sqlite.org
Betreff: [sqlite] Using incremental BLOB functions against a BLOB column in a 
virtual table

Can the incremental BLOB functions (sqlite_blob_open(), sqlite_blob_read(), 
etc) access BLOB column data defined in a SQLite virtual table? If it matters, 
I am only interested in read-only access at this time.

If the answer is yes, is there any facility in virtual table support for 
xColumn or any other method that will expose to the virtual table module the 
positioning/length values supplied as the 3rd and 4th arguments of the 
sqlite_blob_read() function (N bytes and offset values)?


Randy Evans
___
sqlite-users mailing list
sqlite-users at mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


___
 Gunter Hick
Software Engineer
Scientific Games International GmbH
FN 157284 a, HG Wien
Klitschgasse 2-4, A-1130 Vienna, Austria
Tel: +43 1 80100 0
E-Mail: hick at scigames.at

This communication (including any attachments) is intended for the use of the 
intended recipient(s) only and may contain information that is confidential, 
privileged or legally protected. Any unauthorized use or dissemination of this 
communication is strictly prohibited. If you have received this communication 
in error, please immediately notify the sender by return e-mail message and 
delete all copies of the original communication. Thank you for your cooperation.




[sqlite] Using incremental BLOB functions against a BLOB column in a virtual table

2015-02-23 Thread Richard Hipp
On 2/23/15, Evans, Randall  wrote:
> Can the incremental BLOB functions (sqlite_blob_open(), sqlite_blob_read(),
> etc) access BLOB column data defined in a SQLite virtual table? If it
> matters, I am only interested in read-only access at this time.

no.

>
> If the answer is yes, is there any facility in virtual table support for
> xColumn or any other method that will expose to the virtual table module the
> positioning/length values supplied as the 3rd and 4th arguments of the
> sqlite_blob_read() function (N bytes and offset values)?

There would have to be, in order for incremental blob I/O to be
supported on virtual tables.  The absence of such a method is one
reason why the answer above is "no".

>
>
> Randy Evans
> ___
> sqlite-users mailing list
> sqlite-users at mailinglists.sqlite.org
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
>


-- 
D. Richard Hipp
drh at sqlite.org


[sqlite] Using incremental BLOB functions against a BLOB column in a virtual table

2015-02-23 Thread Evans, Randall
Can the incremental BLOB functions (sqlite_blob_open(), sqlite_blob_read(), 
etc) access BLOB column data defined in a SQLite virtual table? If it matters, 
I am only interested in read-only access at this time.

If the answer is yes, is there any facility in virtual table support for 
xColumn or any other method that will expose to the virtual table module the 
positioning/length values supplied as the 3rd and 4th arguments of the 
sqlite_blob_read() function (N bytes and offset values)?


Randy Evans