Skip to content

0.0.9

Pre-release
Pre-release
Compare
Choose a tag to compare
@Miha-x64 Miha-x64 released this 27 May 00:09
· 290 commits to master since this release

Android bindings

+View.setWhenLongClicked(clickedProperty: MutableProperty<Boolean>)
-SharedPreferenceProperty<T> :  MutableProperty<T>
+SharedPreferenceProperty<T> : TransactionalProperty<SharedPreferences.Editor, T>

Persistence

+PartialStruct<SCH : Schema<SCH>>
+Lens<SCH : Schema<SCH>, in STR : PartialStruct<SCH>, T> : (STR) -> T?
+Lens<SCH, Struct<SCH>, T>.ofStruct(): (Struct<SCH>) -> T
+NamedLens<SCH : Schema<SCH>, in STR : PartialStruct<SCH>, T> : Lens<SCH, STR, T>
-FieldDef<SCH : Schema<SCH>, T> : (Struct<SCH>) -> T
+FieldDef<SCH : Schema<SCH>, T> : NamedLens<SCH, PartialStruct<SCH>, T>
-StructTransaction<SCH>.setFrom(source: Struct<SCH>, fields: FieldSet<SCH, FieldDef.Mutable<SCH, *>>)
+StructTransaction<SCH>.setFrom(source: PartialStruct<SCH>, fields: FieldSet<SCH, FieldDef.Mutable<SCH, *>>): FieldSet<SCH, FieldDef.Mutable<SCH, *>>
sealed class DataType<T> {
+    abstract class Partial<T, SCH : Schema<SCH>> : DataType<T>
}

Properties

  • computed diff property cancels computation when gets unobserved
interface PropertiesMemento {
+    fun reader(): PropertyIo
}
class ObservableStruct<SCH : Schema<SCH>> : BaseStruct<SCH>, PropertyStruct<SCH> {
-    fun setFrom(source: Struct<SCH>, fields: FieldSet<SCH, FieldDef.Mutable<SCH, *>>)
+    fun setFrom(source: PartialStruct<SCH>, fields: FieldSet<SCH, FieldDef.Mutable<SCH, *>>): FieldSet<SCH, FieldDef.Mutable<SCH, *>>
}

SQL

Great work on supporting embedded [nullable] [partial] structs as the simplest form of 'relations'

Added extended-persistence

+partial(schema: SCH): DataType.Partial<PartialStruct<SCH>, SCH>
+class PartialStructSnapshot<SCH : Schema<SCH>> : BaseStruct<SCH>
+PartialStruct<SCH>.getOrNull(field: FieldDef<SCH, T>): T?
+PartialStruct<SCH>.getOrDefault(field: FieldDef<SCH, T>, defaultValue: T): T
+PartialStruct<SCH>.getOrElse(field: FieldDef<SCH, T>, defaultValue: () -> T): TSCH.buildPartial(build: +SCH.(StructBuilder<SCH>) -> Unit): PartialStruct<SCH>
+Struct<SCH>.take(fields: FieldSet<SCH, FieldDef<SCH, *>>): PartialStruct<SCH>
+PartialStruct<SCH>.copy(fields: FieldSet<SCH, FieldDef<SCH, *>>, mutate: SCH.(StructBuilder<SCH>) -> Unit): PartialStruct<SCH>

+byteCollection: DataType.Collect<ByteArray, Byte>
+shortCollection: DataType.Collect<ShortArray, Short>
+intCollection: DataType.Collect<IntArray, Int>
+longCollection: DataType.Collect<LongArray, Long>
+floatCollection: DataType.Collect<FloatArray, Float>
+doubleCollection: DataType.Collect<DoubleArray, Double>

+uByte: DataType.Simple<UByte>
+uShort: DataType.Simple<UShort>
+uInt: DataType.Simple<UInt>