On Monday, September 17, 2012 6:36:48 PM UTC-7, Ben Sullivan wrote: > > Can I use Sequel to determine the size of table fields - that is the > maximum number of characters in a string/varchar field, precision on a > float field, max value in an integer field. >
For max length of a char/varchar field, yes, you can, but I don't think this information is directly exposed. Look at the implementation of the schema_dumper extension, in particular the column_schema_to_ruby_type method. I'm not sure what you mean about precision on a float field, since floating point numbers aren't precise in many cases. Precision on a decimal/numeric field, yes, same as above. I'm not sure about what you mean for max value in an integer field. Usually that depends on the size of the data type (2^31-1 for 32-bit integers, 2^63-1 for 64-bit integers). Jeremy -- You received this message because you are subscribed to the Google Groups "sequel-talk" group. To view this discussion on the web visit https://groups.google.com/d/msg/sequel-talk/-/By8QU5W5tkcJ. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/sequel-talk?hl=en.
