cycle / database

Database Abstraction Layer, Schema Introspection, Schema Generation, Query Builders
MIT License
54 stars 23 forks source link

💡 Fragment support in column type #107

Open msmakouz opened 1 year ago

msmakouz commented 1 year ago

I have an idea!

It would be nice to add Fragment support when specifying the column type. When passing a Fragment, don't map it and use it as a custom type. For example, this will allow using the native json type in MySQL (and not map it to text).

#[Column(type: new Fragment('json'))]