Closed alexbodn closed 10 months ago
Salut @alexbodn,
not sure but the first one. Looks like you have executed the query twice (?). And attaching an open db is probably not possible. In general ATTACH should work. However, here is a fresh build with the latest spatialite & sqlite: https://github.com/jvail/spl.js/tree/spatialite-5.1.0/dist. Would you like to give it a try?
Jan
a big thank my friend! sure i will be delighted try 5.1.0. now i suspect my program ran the same query twice. a few moments.
the bug was mine indeed. i previously didn't understand exec().get, so i was calling it twice.
spatialite 5.1.0 seems to work, at least london loads ok. thank you very much mon ami! to load it, i had to disable the initial parameters to SPL():
const spl = await SPL(
/*[],
{
autoGeoJSON: 0 ? false : {
precision: 6,
options: 0,
},
},*/
);
these parameters weren't very important to me.i just played with them, and they previously worked as i would expect.
thank you very much, spl.js gives me much joy!
Très bien! Thank you for the feedback.
to load it, i had to disable the initial parameters to SPL():
Oh, ja. I changed the API for the rc because I found it a bit inconvenient to always pass the empty extensions array first and then the options. It is just the other way round now: https://github.com/jvail/spl.js/blob/main/dist/index.js#L53
Salut @jvail mon ami,
First, a big thank for helping me play with gis sql on the phone in my hand. there are two bug manifestations of sqlite in general, that i haven't encountered with other versions, on either linux or wasm. As the following queries do work, even in spatialite, but give (similar) error messages, probably, compiling against newer sqlite (I'm using 3.41 on wasm and 3.43 on linux) would remove the error messages.
So the queries:
create temp table t2 as WITH t1(x,y,n,color) AS (VALUES (100,100,3,'red'), (200,100,4,'orange'), (300,100,5,'green'), (400,100,6,'blue'), (500,100,7,'purple'), (100,200,8,'red'), (200,200,10,'orange'), (300,200,12,'green'), (400,200,16,'blue'), (500,200,20,'purple') ) SELECT * FROM t1; -- table t2 already exists
ATTACH DATABASE '/proj/proj.db' AS proj; -- database proj is already in use
again, a big thank alex