SQLite supports ATTACH/DETACH statements which let you add named databases
to your database handle. This is convenient for things like copying data
between databases, or segregating data into sets used in different ways
(perhaps if you had two applications served from the same origin which want
to share data). This is disabled in Gears because it doesn't respect the
same-origin policy.
I propose:
attach([name])/detach([name])
Return value: void
Parameters: name - optional
Exceptions: Throws an exception if an error occurs.
This will treat name exactly as open(). The corrosponding database would
be attached to the handle as name. An example usage might be:
var db = google.gears.factory.create('beta.database', '1.0');
db.open();
db.attach('shared');
var rs = db.execute('SELECT username FROM shared.Users');
...
Original issue reported on code.google.com by Scott.Hess on 8 Jun 2007 at 5:59
Original issue reported on code.google.com by
Scott.Hess
on 8 Jun 2007 at 5:59