You are viewing a plain text version of this content. The canonical link for it is here.
Posted to torque-user@db.apache.org by Tr...@novainfo.com on 2004/02/23 20:52:26 UTC

precision for decimals in Torque

I searched the archives and see some history of this issue but no responses.
In Oracle, I'd define the column as a number(10,2).  This would allow me to
store a currency value.  How do I define it in the project-schema.xml?

Note:  The information contained in this email and in any attachments is
intended only for the person or entity to which it is addressed and may
contain confidential and/or privileged material.  Any review,
retransmission, dissemination or other use of, or taking of any action in
reliance upon, this information by persons or entities other than the
intended recipient is prohibited.  The recipient should check this email and
any attachments for the presence of viruses.  Sender accepts no liability
for any damages caused by any virus transmitted by this email. If you have
received this email in error, please notify us immediately by replying to
the message and delete the email from your computer.  This e-mail is and any
response to it will be unencrypted and, therefore, potentially unsecure.
Thank you.  NOVA Information Systems, Inc.

---------------------------------------------------------------------
To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
For additional commands, e-mail: torque-user-help@db.apache.org


Re: precision for decimals in Torque

Posted by Sean Laurent <se...@neuronfarm.com>.
You can do this by using the size attribute for the column.  For example:

<table name="sample">
  <column name="value" required="true" type="NUMERIC" size="10,2"/>
</table>

-Sean

On Monday 23 February 2004 01:52 pm, Travis.Prescott@novainfo.com wrote:
> I searched the archives and see some history of this issue but no
> responses. In Oracle, I'd define the column as a number(10,2).  This would
> allow me to store a currency value.  How do I define it in the
> project-schema.xml?
>
> Note:  The information contained in this email and in any attachments is
> intended only for the person or entity to which it is addressed and may
> contain confidential and/or privileged material.  Any review,
> retransmission, dissemination or other use of, or taking of any action in
> reliance upon, this information by persons or entities other than the
> intended recipient is prohibited.  The recipient should check this email
> and any attachments for the presence of viruses.  Sender accepts no
> liability for any damages caused by any virus transmitted by this email. If
> you have received this email in error, please notify us immediately by
> replying to the message and delete the email from your computer.  This
> e-mail is and any response to it will be unencrypted and, therefore,
> potentially unsecure. Thank you.  NOVA Information Systems, Inc.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
> For additional commands, e-mail: torque-user-help@db.apache.org

-- 
------------------------------
To the systems programmer, users and applications serve only to provide a test 
load.
------------------------------


---------------------------------------------------------------------
To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
For additional commands, e-mail: torque-user-help@db.apache.org


Torque for database schema versioning and updates

Posted by Erik <ma...@openstandards.net>.
Hello.  I'd like to create a component that helps to manage versioning
of the database and incremental updates of versions when a user runs a
new version of software for the first time.  I'm interested in using
torque as a component because of its ability to manage DDL in XML
format.  

By versioning I mean that I want a product to automatically update the
user's database schema incrementally until it matches the current
version of the product.  I did this a long time ago for a distributed
application in Visual Foxpro.  The application was self-updating when
the user ran a new release for a first time.  Because updates were
incremental, it was ok if a user skipped a version.  Each table was
versioned via schema detection logic, so it would perform alters on each
table to upgrade it to the next version, and repeat this cycle until the
database schema was completely up-to-date.

I need this in Java (JDBC), or more specifically, in J2EE as an EJB
component or library to be used by EJBs.  I'd like to create a component
that is general enough to work for any application.  Perhaps the
developer could create data schema definitions, table versioning logic
and incremental update logic in XML or in Java.  

I'd like to use Torque for a portion of the work, and code the rest. 
Can anyone describe how Torque can help and where I will need to fill in
the gaps?  Has anyone tried or thought about something like this?

Currently, I have an immediate need for this functionality in a
commercial application, but am completely open to the idea of open
sourcing the data schema versioning and automatic updating component as
this is not core to the commercial product.  

Erik



---------------------------------------------------------------------
To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
For additional commands, e-mail: torque-user-help@db.apache.org