Re: [basex-talk] Queuing order for db:add

2023-04-11 Thread Christian Grün
> I was just wondering whether I can rely on insertion order being kept
> when I perform a corresponding db:get("db", "a.xml").

Thanks. Yes, you can!


Re: [basex-talk] Queuing order for db:add

2023-04-11 Thread Marco Lettere

Hi Christian,

sorry for not being clear enough.

I was just wondering whether I can rely on insertion order being kept 
when I perform a corresponding db:get("db", "a.xml"). In other words 
given your slightly modified example:


for $i in 1 to 100
return db:add('db', , 'a.xml')

Will

db:get('db','a.xml')

always return

(, , ...)

M.

On 11/04/23 09:03, Christian Grün wrote:

Hi Marco,


Does db:add multiple resources to the same path guarantee sorting based
on insertion time?

Sorry for the late reply, but I’m not sure if I understand your
question. It’s correct, it’s possible to add multiple resources to the
same path, e.g. as follows:

for $i in 1 to 100
return db:add('db', , 'a.xml')

There’s no need to do any sorts, as the target path is identical. All
resources will simply be attached to the database storage.

Or did you question yourself if sorting is some necessary when
resources are requested in a later step?

Ciao,
Christian


Re: [basex-talk] Queuing order for db:add

2023-04-11 Thread Christian Grün
Hi Marco,

> Does db:add multiple resources to the same path guarantee sorting based
> on insertion time?

Sorry for the late reply, but I’m not sure if I understand your
question. It’s correct, it’s possible to add multiple resources to the
same path, e.g. as follows:

for $i in 1 to 100
return db:add('db', , 'a.xml')

There’s no need to do any sorts, as the target path is identical. All
resources will simply be attached to the database storage.

Or did you question yourself if sorting is some necessary when
resources are requested in a later step?

Ciao,
Christian


[basex-talk] Queuing order for db:add

2023-04-03 Thread Marco Lettere

Dear all,

I've probably overlooked this in the docs but asking for confirmation. 
Does db:add multiple resources to the same path guarantee sorting based 
on insertion time?


If yes, then maybe I could add a note about this in the docs?

Thanks,

Marco.