Re: [gnome-db] Create Index SEQUENCE.



On Mon, 2006-09-04 at 20:53 +1000, Bas Driessen 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...

Vivien, how would an CREATE INDEX xml object look like? I am having problems deciphering the table no 10. The structure below segfaults. Can you please advise?

<serv_op_data>
  <op_data path="/INDEX_DEF_P/INDEX_NAME">TestIdx</op_data>
  <op_data path="/INDEX_DEF_P/INDEX_ON_TABLE">Test1</op_data>
  <op_data path="/INDEX_FIELDS_S/0/INDEX_ON_TABLE">Id</op_data>
  <op_data path="/INDEX_FIELDS_S/1/INDEX_ON_TABLE">Desc</op_data>
</serv_op_data>

Some examples should be added to the doco, as an example explains more if you see the technology for the first time than just tables.

Please ignore. Typo. Correct syntax worked ->

<serv_op_data>
   <op_data path="/INDEX_DEF_P/INDEX_NAME">TestIdx</op_data>
  <op_data path="/INDEX_DEF_P/INDEX_ON_TABLE">Test1</op_data>
  <op_data path="/INDEX_FIELDS_S/0/INDEX_FIELD">Id</op_data>
  <op_data path="/INDEX_FIELDS_S/1/INDEX_FIELD">Desc</op_data>
</serv_op_data>




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]