Ahhh... I see now.  I didn't realize that the virtual table persisted in the
database until explicitly dropped, I thought they were volatile entities
like temp tables.

The entire module concept makes a great deal more sense to me now as well.
I believe I can finally see how it all works together.  Very nice.

Thanks a million Mr. Hipp (and everyone else on the mailing list, of
course)!

Mike Brehm


-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, October 10, 2006 10:59 PM
To: sqlite-users@sqlite.org
Subject: Re: [sqlite] What causes xConnect and xDisconnect to actually get
invoked? (Virtual Tables)

"Michael Brehm" <[EMAIL PROTECTED]> wrote:
> I realize that the virtual table implementation is currently experimental,
> but I've been added them into a project of mine (which will end up public
> when it's done), and I don't truly understand the purpose of the xConnect
> and xDisconnect callbacks, when compared with their xCreate and xDestroy
> counterparts.
> 
>  
> 
> xCreate is called with CREATE VIRTUAL TABLE
> 
> xDestroy is called with DROP TABLE
> 
>  
> 
> .. when/why are xConnect and xDisconnect actually invoked by SQLite? 
> 
>  

xCreate is invoked to actually create the virtual table the
first time that the CREATE VIRTUAL TABLE statement is entered
into the system.

xConnect is invoked when setting up a new database connection,
or when reparsing the schema for an existing database connection.
The virtual table already exists and only a new connection to the
existing table is needed.

There is a similar distinction between xDestroy and xDisconnect.
--
D. Richard Hipp  <[EMAIL PROTECTED]>


----------------------------------------------------------------------------
-
To unsubscribe, send email to [EMAIL PROTECTED]
----------------------------------------------------------------------------
-


-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------

Reply via email to