• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
searcheable / queryable arrays stored in keys?
#1
Hi Guys

this is more a question im sure a lot of devs will ask.

If a dev decides to store arrays in a key within livecloud, is it then possible to run a query on the database and include results that are within the array key?

for example, if I were to store invoices as a DGData array in a key called invData, and 3 of the keys in within the stored array is productBought =20 , Customer = Sid, Item=Mask

I want to run a query looking for invoices that were made out to Sid for masks , and want only invoices where he bought over 10 masks.

this is really easy to do if each line item is stored seperately in the livecloud database, but if you store the invoice data as and array key within a key in the database , can it work?

the upside to being able to do this is that the database is nice and compact with each invoice or whatever taking up a single record ,

the downside is the queries being difficult to do, if its possible at all

The upside to storing all the line items as seperate records is the ease of search, and the ability to run really cool queries.
the downside being that individual line items will take up a record and be scattered all over the plave, resulting in zillions of records and writes to the database

Sid
  Reply


Messages In This Thread
searcheable / queryable arrays stored in keys? - by sid - 05-16-2020, 03:30 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)