[FEATURE REQUEST]: Camel case plugin - option to disable transformations on selected columns or data types
Hello,
The CamelCasePlugin options allow disabling conversion to camel case on all nested objects https://kysely-org.github.io/kysely-apidoc/interfaces/CamelCasePluginOptions.html#maintainNestedObjectKeys, however i don't find this quite useful as for example we might want to keep conversion on nested objects e.q. included by jsonArrayFrom, jsonObjectFrom helpers but we might not want to convert some jsonb column data.
For example we could have a custom_fields jsonb column where object keys are actual values (in this case, related entity ids)
{
"field_9npl6g7wqazcdgjz":{
"name":"Name 1",
"type":"TYPE_1",
},
"field_mvj5nwggpmyxwbj6":{
"name":"Name 2",
"type":"TYPE_2"
}
}I would want to be able to disable conversion for this selected column or data type e.q. jsonb either on the pluguin level, or ideally on the query level if it would be possible.
new CamelCasePlugin({ skipDataTypes: ["json", "jsonb"] })
// or
new CamelCasePlugin({ skipColumns: ["customFields"] })db.selectFrom("Table")
.select(["col1", "col2"])
.skipCamelCase(["col2"])
.executeTakeFirst();
Source: kysely-org/kysely