You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ddlutils-dev@db.apache.org by Kevin Carr <ks...@gmail.com> on 2010/10/28 19:11:58 UTC

Adding data tag to schema

I am thinking of adding a data tag to the schema.  Something like:

<data table="widgets" replace="true">
<row>
 <field type="string" name="widgetName" indexed="true">My first
widget</field>
<field type="number" name="id" />
 <field type="string" name="category">Business</field>
</row>
    <row>
<field type="string" name="widgetName" indexed="true">My Second
widget</field>
 <field type="number" name="id" auto="true" />
<field type="string" name="category">Business</field>
 </row>
<row>
<field type="string" name="widgetName" indexed="true">My third
widget</field>
 <field type="number" name="id" auto="true" />
<field type="string" name="category">Business</field>
 </row>
</data>

Indexed would tell the code that this field is the should be searched first
to see if it exists, and replaced if it does.
Auto tells the code that this field is auto generated and shouldn't be
messed with.  Basically, the field is ignored when creating the update or
insert.

Does this sound like a good idea?  Am I trying to fix a problem that is
already fixed better elsewhere?

Thanks

Re: Adding data tag to schema

Posted by Thomas Dudziak <to...@gmail.com>.
One thing that I was thinking about, is to add a way to express
changes, as opposed to expressing the goal which is what DdlUtils does
now. E.g. you would have some way to describe adding columns, dropping
indexes, etc. However, that is a decent amount of work ...

cheers,
Tom

On Mon, Nov 1, 2010 at 22:24, Kevin Carr <ks...@gmail.com> wrote:
> Ok, scratch this.  I found the data import from xml.
>
> On Thu, Oct 28, 2010 at 12:11 PM, Kevin Carr <ks...@gmail.com> wrote:
>
>> I am thinking of adding a data tag to the schema.  Something like:
>>
>> <data table="widgets" replace="true">
>> <row>
>>  <field type="string" name="widgetName" indexed="true">My first
>> widget</field>
>> <field type="number" name="id" />
>>  <field type="string" name="category">Business</field>
>> </row>
>>     <row>
>> <field type="string" name="widgetName" indexed="true">My Second
>> widget</field>
>>  <field type="number" name="id" auto="true" />
>> <field type="string" name="category">Business</field>
>>  </row>
>> <row>
>> <field type="string" name="widgetName" indexed="true">My third
>> widget</field>
>>  <field type="number" name="id" auto="true" />
>> <field type="string" name="category">Business</field>
>>  </row>
>> </data>
>>
>> Indexed would tell the code that this field is the should be searched first
>> to see if it exists, and replaced if it does.
>> Auto tells the code that this field is auto generated and shouldn't be
>> messed with.  Basically, the field is ignored when creating the update or
>> insert.
>>
>> Does this sound like a good idea?  Am I trying to fix a problem that is
>> already fixed better elsewhere?
>>
>> Thanks
>>
>
>
>
> --
> Scott Carr
>

Re: Adding data tag to schema

Posted by Kevin Carr <ks...@gmail.com>.
Ok, scratch this.  I found the data import from xml.

On Thu, Oct 28, 2010 at 12:11 PM, Kevin Carr <ks...@gmail.com> wrote:

> I am thinking of adding a data tag to the schema.  Something like:
>
> <data table="widgets" replace="true">
> <row>
>  <field type="string" name="widgetName" indexed="true">My first
> widget</field>
> <field type="number" name="id" />
>  <field type="string" name="category">Business</field>
> </row>
>     <row>
> <field type="string" name="widgetName" indexed="true">My Second
> widget</field>
>  <field type="number" name="id" auto="true" />
> <field type="string" name="category">Business</field>
>  </row>
> <row>
> <field type="string" name="widgetName" indexed="true">My third
> widget</field>
>  <field type="number" name="id" auto="true" />
> <field type="string" name="category">Business</field>
>  </row>
> </data>
>
> Indexed would tell the code that this field is the should be searched first
> to see if it exists, and replaced if it does.
> Auto tells the code that this field is auto generated and shouldn't be
> messed with.  Basically, the field is ignored when creating the update or
> insert.
>
> Does this sound like a good idea?  Am I trying to fix a problem that is
> already fixed better elsewhere?
>
> Thanks
>



-- 
Scott Carr