Changes
-
Add new
jsonfunction property toPostgrestBuilder#insertandPostgrestBuilder#update(to customize Json encoding) -
Add new
PostgrestBuilder#updateoverload to use an DTO instead of the DSL:client.postgrest["test"].update(SomeData(2)) { eq("id", 2) }
-
Add new overloads to PostgrestFilterBuilder:
sl (rangeLt), sr (rangeGt), nxr (rangeLte), nxl (rangeGte) -
Add new methods to PostgrestFilterBuilder:
cs/contains, cd/contained, ov/overlaps -
Change
valuetype of PostgrestFilterBuilder methodssl, sr, nxl, nxrtoLongRangeinstead ofString -
Add new config property
propertyConversionMethodtoPostgrest:You can now specify which method postgrest-kt should use to convert a property to a column name:
If you have this data class:
@Serializable data class Test( @SerialName("some_property") val someProperty: String )
And want to use this syntax:
client.postgrest["table"].select { Test::someProperty eq "test" }
you can now specify how
somePropertygets converted to a column name in the Postgrest config:val client = createSupabaseClient(url, key) { install(Postgrest) { propertyConversionMethod = PropertyConversionMethod.SERIAL_NAME //only works for JVM/Android //or propertyConverisonMethod = PropertyConversionMethod.CAMEL_CASE_TO_SNAKE_CASE //works for all platforms //or write your own (defaults to CAMEL_CASE_TO_SNAKE_CASE } }
depending on the method the resulting column name will either be the
@SerialNamevalue or the property name just gets converted to snake case.
Note: same works for the update DSL -
Make values in
PostgrestUpdatenullable -
Add Postgrest Tests
-
Remove deprecated methods in Storage
-
Remove experimental annotations