Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge KeyValueProperty and NameValuePair #659

Open
Jolanrensen opened this issue Apr 15, 2024 · 0 comments
Open

Merge KeyValueProperty and NameValuePair #659

Jolanrensen opened this issue Apr 15, 2024 · 0 comments
Milestone

Comments

@Jolanrensen
Copy link
Collaborator

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
}
@zaleslaw zaleslaw added this to the Backlog milestone Apr 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants