Skip to content

Merge KeyValueProperty and NameValuePair #659

Open
@Jolanrensen

Description

@Jolanrensen

Seems like they try to solve the same thing:

DataRowApi.kt:

@DataSchema
public data class NameValuePair<V>(val name: String, val value: V)

KeyValueProperty.kt:

/** A [DataSchema] interface / class can implement this if it represents a map-like data schema (so key: value). */
@DataSchema
public interface KeyValueProperty<T> {
    // needs to be explicitly overridden in @DataSchema interface, otherwise extension functions won't generate (TODO)
    public val key: String

    // needs to be explicitly overridden in @DataSchema interface, otherwise type will be read as `T` and extensions won't generate (TODO)
    @ColumnName("value")
    public val `value`: T
}

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions