haxetink / tink_sql

SQL embedded into Haxe
MIT License
53 stars 16 forks source link

Specifying length for integer is basically useless #66

Open kevinresol opened 6 years ago

kevinresol commented 6 years ago

I just realized it: https://stackoverflow.com/questions/5634104/what-is-the-size-of-column-of-int11-in-mysql-in-bytes/27519793#27519793

Maybe we should consider removing the type parameter, and use Haxe's Int type instead. (But could add TinyInt, etc)

kevinresol commented 6 years ago

In fact, I think we should support all basic Haxe data types and map them to the most sensible db type. But still allow using the specialized types in Types. Any comments @benmerckx @jasononeil @back2dos ?

back2dos commented 6 years ago

I had no idea. Good to know ^^

In fact, I think we should support all basic Haxe data types and map them to the most sensible db type.

Definitely. If we could have typedef BigInt = haxe.Int64 that'd be pretty cool, but I suppose that depends on the drivers.

benmerckx commented 6 years ago

In fact, I think we should support all basic Haxe data types and map them to the most sensible db type.

That'd be nice, because the structures are often used elsewhere (clientside) too.