Re: Livecode SQLite

2022-08-13 Thread Tom Glod via use-livecode
Hey Mark, I'm using very simple examples to run it, so I don't think its my
query, but you are eight I shouldreport this. This would be really great to
have. Esp since  almost everything is json these days.
I will report it in the next few days. Thanks,

On Fri, Aug 12, 2022 at 12:57 AM Mark Waddingham via use-livecode <
use-livecode@lists.runrev.com> wrote:

> On 2022-08-11 16:16, Tom Glod via use-livecode wrote:
> > I was interested in implementing a relatively new feature where you can
> > index and query json documents and read the keys directly.
> >
> > https://dgl.cx/2020/06/sqlite-json-support
> >
> > I guess, if this is true, is there any documentation about which
> > features
> > of sqlite are implemented and which are not?
>
> The version of SQLite is currently 3.34 built with FTS3,
> FTS3_PARANTHESIS, FTS4, FTS5, RTREE and JSON1 options.
>
> So the JSON features (at least as far as those included in 3.34) should
> be included - perhaps the queries you are trying rely on features
> (perhaps not JSON related) included in more recent versions?
>
> If you file a bug report with what examples of what isn't working, then
> we'll look into updating to the latest version of the library.
>
> Warmest Regards,
>
> Mark.
>
> --
> Mark Waddingham ~ m...@livecode.com ~ http://www.livecode.com/
> LiveCode: Everyone can create apps
>
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Livecode SQLite

2022-08-11 Thread Mark Waddingham via use-livecode

On 2022-08-11 16:16, Tom Glod via use-livecode wrote:

I was interested in implementing a relatively new feature where you can
index and query json documents and read the keys directly.

https://dgl.cx/2020/06/sqlite-json-support

I guess, if this is true, is there any documentation about which 
features

of sqlite are implemented and which are not?


The version of SQLite is currently 3.34 built with FTS3, 
FTS3_PARANTHESIS, FTS4, FTS5, RTREE and JSON1 options.


So the JSON features (at least as far as those included in 3.34) should 
be included - perhaps the queries you are trying rely on features 
(perhaps not JSON related) included in more recent versions?


If you file a bug report with what examples of what isn't working, then 
we'll look into updating to the latest version of the library.


Warmest Regards,

Mark.

--
Mark Waddingham ~ m...@livecode.com ~ http://www.livecode.com/
LiveCode: Everyone can create apps

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Livecode SQLite

2022-08-11 Thread Tom Glod via use-livecode
Hi Sean,

The SQLite db i want to read json fields from is local.  I know there are
lots of workarounds.

But in link I provided, the premise was using sqlite function to index and
read a jason document's field.

like so:

sqlite> insert into t values(json('{"d":"42"}'));
sqlite> select * from t WHERE d = 42;
{"d":"42"}|42

Thanks Sean, I'm happy you found the help you needed with your email
problem.

On Thu, Aug 11, 2022 at 11:37 AM Pi Digital via use-livecode <
use-livecode@lists.runrev.com> wrote:

> How was you accessing the database? Is it locally based?
>
> The ones I access are stored on a web host server with a cPanel. I have my
> own php I POST my sql request to and receive JSON back. I then use
> JSONtoArray or, recommended, JsonImport encapsulated in a ‘try’ structure
> to convert the data.
>
> To tell the database to respond with json is not done at the LC end but
> must either be set up in the DB itself or, as in my case, whatever is the
> medium for the data, PHP for me.
>
> Sean Cole
> Pi Digital Productions Ltd
>
> eMail Ts & Cs
>
>
> > On 11 Aug 2022, at 16:16, Tom Glod via use-livecode <
> use-livecode@lists.runrev.com> wrote:
> >
> > Hi Folks,
> >
> > I have a question about Livecode's SQLite implementation.
> >
> > Looking at the official SQLite specs there seem to be json related
> > functions.
> >
> > https://www.sqlite.org/json1.html
> >
> > but none of them seem to work using Livecode's driver.
> > I was under the impression we had a full implementation
> >
> > I was interested in implementing a relatively new feature where you can
> > index and query json documents and read the keys directly.
> >
> > https://dgl.cx/2020/06/sqlite-json-support
> >
> > I guess, if this is true, is there any documentation about which features
> > of sqlite are implemented and which are not?
> >
> > TIA,
> > --
> > Tom Glod
> > ___
> > use-livecode mailing list
> > use-livecode@lists.runrev.com
> > Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> > http://lists.runrev.com/mailman/listinfo/use-livecode
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Livecode SQLite

2022-08-11 Thread Pi Digital via use-livecode
How was you accessing the database? Is it locally based? 

The ones I access are stored on a web host server with a cPanel. I have my own 
php I POST my sql request to and receive JSON back. I then use JSONtoArray or, 
recommended, JsonImport encapsulated in a ‘try’ structure to convert the data. 

To tell the database to respond with json is not done at the LC end but must 
either be set up in the DB itself or, as in my case, whatever is the medium for 
the data, PHP for me. 

Sean Cole
Pi Digital Productions Ltd

eMail Ts & Cs


> On 11 Aug 2022, at 16:16, Tom Glod via use-livecode 
>  wrote:
> 
> Hi Folks,
> 
> I have a question about Livecode's SQLite implementation.
> 
> Looking at the official SQLite specs there seem to be json related
> functions.
> 
> https://www.sqlite.org/json1.html
> 
> but none of them seem to work using Livecode's driver.
> I was under the impression we had a full implementation
> 
> I was interested in implementing a relatively new feature where you can
> index and query json documents and read the keys directly.
> 
> https://dgl.cx/2020/06/sqlite-json-support
> 
> I guess, if this is true, is there any documentation about which features
> of sqlite are implemented and which are not?
> 
> TIA,
> -- 
> Tom Glod
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Livecode SQLite

2022-08-11 Thread Tom Glod via use-livecode
Hi Folks,

I have a question about Livecode's SQLite implementation.

Looking at the official SQLite specs there seem to be json related
functions.

https://www.sqlite.org/json1.html

but none of them seem to work using Livecode's driver.
I was under the impression we had a full implementation

I was interested in implementing a relatively new feature where you can
index and query json documents and read the keys directly.

https://dgl.cx/2020/06/sqlite-json-support

I guess, if this is true, is there any documentation about which features
of sqlite are implemented and which are not?

TIA,
-- 
Tom Glod
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode