Re: [gnome-db] Create Index SEQUENCE.
- From: "Vivien Malerba" <vmalerba gmail com>
- To: bas driessen xobas com
- Cc: GNOME-DB List <gnome-db-list gnome org>
- Subject: Re: [gnome-db] Create Index SEQUENCE.
- Date: Tue, 29 Aug 2006 14:59:23 +0200
On 8/29/06, Bas Driessen <bas driessen xobas com> wrote:
On Tue, 2006-08-29 at 13:47 +0200, Vivien Malerba wrote:
On 8/29/06, Bas Driessen <bas driessen xobas com> wrote:
>
> Hi Vivien,
>
> Can you please give me an example in what kind of format I have to put the
> fields in case of SEQUENCE when creating an index? Is it a space separated
> list? Comma separated? Something else?
>
> >From your Table no 6:
>
> /INDEX_FIELDS_S SEQUENCE Yes List of fields on which the index is applied
> (min: 1 item)
In that context a sequence is a collection of instances of some data
grouped together. In the case of the "/INDEX_FIELDS_S" sequence, it
contains at least one string parameter named "INDEX_FIELD" but
depending on the provider, it can contain more like ordering, etc. So
in this case the sequence can contain 1 or more groups of data
composed of a string parameter and maybe other information.
The path to access the "INDEX_FIELD" in the sequence is in the form:
"/INDEX_FIELDS_S/<n>/INDEX_FIELD" where <n> is the nth
group of data.
To be more specific for example if your index is on 2 fields, you'd
have
"/INDEX_FIELDS_S/0/INDEX_FIELD" and "/INDEX_FIELDS_S/1/INDEX_FIELD"
which you can put in your XML string to fill values in the
GdaServerOperation.
Tell me if this explanation is not clear enough...
Thanks, I think I understand, but will test it and get back to you if I run
into any problems.
No problem. To help you see the actual information required by each
provider, use the "testing/test-dyn-widgets -t 15" program, and click
on the "dump" button after you have selected a provider and an
operation and clicked on "test".
As example here is what ig gives for postgres for a create_index:
<?xml version="1.0"?>
<serv_op_data>
<op_data path="/INDEX_DEF_P/INDEX_NAME"/>
<op_data path="/INDEX_DEF_P/INDEX_TYPE">UNIQUE</op_data>
<op_data path="/INDEX_DEF_P/INDEX_ON_TABLE"/>
<op_data path="/INDEX_DEF_P/INDEX_METHOD"/>
<op_data path="/INDEX_DEF_P/INDEX_TABLESPACE"/>
<op_data path="/INDEX_DEF_P/INDEX_PREDICATE"/>
<op_data path="/INDEX_FIELDS_S/0/INDEX_FIELD">indexed_field</op_data>
</serv_op_data>
and the same thing for MySQL:
<?xml version="1.0"?>
<serv_op_data>
<op_data path="/INDEX_DEF_P/INDEX_TYPE">UNIQUE</op_data>
<op_data path="/INDEX_DEF_P/INDEX_NAME"/>
<op_data path="/INDEX_DEF_P/INDEX_ON_TABLE"/>
<op_data path="/INDEX_DEF_P/INDEX_METHOD"/>
<op_data path="/INDEX_FIELDS_S/0/INDEX_FIELD">indexed_field</op_data>
<op_data path="/INDEX_FIELDS_S/0/INDEX_LENGTH"/>
<op_data path="/INDEX_FIELDS_S/0/INDEX_SORT_ORDER"/>
</serv_op_data>
Cheers,
Vivien
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]