[sqlite] Array or set type or some other indexable data?

2015-11-13 Thread E.Pasma
op 12-11-2015 17:35 schreef J Decker op d3ck0r at gmail.com: > On Thu, Nov 12, 2015 at 7:16 AM, E.Pasma wrote: >> 12 nov 2015, om 07:02, J Decker: >> >>> So I've used CTE to solve a simple problem... I'm tempted to use it to >>> fix more problems... but I'm wondering how to select different

[sqlite] Array or set type or some other indexable data?

2015-11-12 Thread Stephan Beal
On Thu, Nov 12, 2015 at 6:44 PM, J Decker wrote: > So... I guess something like this works; other than the triplication > of the initial path string. works for read-only access... doesn't > return where it failed (although can with leaf == 0 ) > You can use multiple WITHs to get rid of some of

[sqlite] Array or set type or some other indexable data?

2015-11-12 Thread Keith Medcalf
fficiently. > -Original Message- > From: sqlite-users-bounces at mailinglists.sqlite.org [mailto:sqlite-users- > bounces at mailinglists.sqlite.org] On Behalf Of E.Pasma > Sent: Thursday, 12 November, 2015 16:14 > To: SQLite mailing list > Subject: Re: [sqlite] Array or set type

[sqlite] Array or set type or some other indexable data?

2015-11-12 Thread Scott Hess
On Thu, Nov 12, 2015 at 4:52 PM, J Decker wrote: > > So something like "select value from option_map_view where path is > > set type>"? > > A path name like '/system/device/com port/1' is used as an array of names > > here. Only the indexing with intst and substr is laborious. Maybe some > >

[sqlite] Array or set type or some other indexable data?

2015-11-12 Thread J Decker
> So something like "select value from option_map_view where path is set type>"? > A path name like '/system/device/com port/1' is used as an array of names > here. Only the indexing with intst and substr is laborious. Maybe some > future SQLite version includes a group_split function to make

[sqlite] Array or set type or some other indexable data?

2015-11-12 Thread E.Pasma
12 nov 2015, om 07:02, J Decker: > So I've used CTE to solve a simple problem... I'm tempted to use it to > fix more problems... but I'm wondering how to select different values > at different levels. I know there's like 'select * from table where > column in ( set,of,things) ' but can I index

[sqlite] Array or set type or some other indexable data?

2015-11-12 Thread R Smith
On 2015/11/12 8:02 AM, J Decker wrote: > So I've used CTE to solve a simple problem... I'm tempted to use it to > fix more problems... but I'm wondering how to select different values > at different levels. I know there's like 'select * from table where > column in ( set,of,things) ' but can I

[sqlite] Array or set type or some other indexable data?

2015-11-12 Thread J Decker
So... I guess something like this works; other than the triplication of the initial path string. works for read-only access... doesn't return where it failed (although can with leaf == 0 ) option4_map ( option_id,parent_option_id,name_id ) option4_names ( name_id, name ) option4_values (

[sqlite] Array or set type or some other indexable data?

2015-11-12 Thread J Decker
On Thu, Nov 12, 2015 at 7:16 AM, E.Pasma wrote: > 12 nov 2015, om 07:02, J Decker: > > >> So I've used CTE to solve a simple problem... I'm tempted to use it to >> fix more problems... but I'm wondering how to select different values >> at different levels. I know there's like 'select * from

[sqlite] Array or set type or some other indexable data?

2015-11-12 Thread Igor Tandetnik
On 11/12/2015 1:02 AM, J Decker wrote: > would like to do something like ' select value from option_map where > name is ["system","device","com port", "1" ] ' where the program > statement would look more like > > GetOptionValue ( "/system/device/com port/1" ) where the name is > really sort of

[sqlite] Array or set type or some other indexable data?

2015-11-11 Thread J Decker
So I've used CTE to solve a simple problem... I'm tempted to use it to fix more problems... but I'm wondering how to select different values at different levels. I know there's like 'select * from table where column in ( set,of,things) ' but can I index into the set? is there some sort of way I