Following on from https://github.com/jeremyevans/sequel/issues/1245
> Whether or not it is a good idea to use ruby class names for database-independent types, that's that route Sequel took, and changing it doesn't make much sense at this point. Do you have a specific recommendation in this area that is backwards compatible? I guess I feel that adding a Sequel::Boolean class and using that would make more sense to new users. There has been a big discussion here https://bugs.ruby-lang.org/issues/12515 > Just so you know, MySQL is not "most databases". Even if most databases supported 1/2/4/8, what are you supposed to do with size: 7? If you want to use database specific types, Sequel makes that very easy to do, by just providing the database specific type name instead of using a ruby class. I'm using SQLite, Postgres and MySQL and all of them support different size integer data types: Postgres: https://www.postgresql.org/docs/9.1/static/datatype-numeric.html MySQL: http://dev.mysql.com/doc/refman/5.7/en/integer-types.html SQLite (pretty loose IMHO): http://www.sqlite.org/datatype3.html We have some tables which have the better part of a billion records. If we can shave off a few bytes per record, this can be a big win for both storage and indexes. Keep in mind that int(8) is actually the display size, not the storage size. From what I understand, the name of the datatype affects the storage (e.g. integer vs smallint). It would actually be nice to specify things like 'unsigned' and 'bytesize' and have this map to the correct internal datatypes. But, perhaps I'm asking too much? -- You received this message because you are subscribed to the Google Groups "sequel-talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/sequel-talk. For more options, visit https://groups.google.com/d/optout.
