Hey Geoff, I'd have to look up the specifics to give you exact code, but the best way to do this is probably to make a class that wraps an instance of DatabaseMetaData. That wrapper class can then pull the size of any column it wants. Get an instance of Connection from Torque, then call getMetaData() on it. Check out the API for DatabaseMetaData for more info on how to get col size data.
Hope this helps, Roy ----- Original Message ----- From: "Geoff Fortytwo" <[EMAIL PROTECTED]> To: "Turbine Torque Users List'" <[EMAIL PROTECTED]> Sent: Monday, June 10, 2002 7:24 PM Subject: max column size > In the schema for a project I specify the maximum size of all the fields. > Is there a way to get that information at runtime? > > For instance, take the following schema table: > <table name="UserGameReview" javaName="UserGameReview" idMethod="none" > skipSql="true"> > <column > name="id" javaName="Id" required="true" type="INTEGER" > size="10"/> > <column name="review" javaName="Review" required="false" > type="VARCHAR" size="500"/> > </table> > > Is there a way, to do something like: > UserGameReviewPeer.getMaxSizeOfReview() or > UserGameReviewPeer.getMaxSize(UserGameReviewPeer.REVIEW) > such that that function would return 500 (because that's what's specified > in the schema). > > > -- > To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> > For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
