Skip to content

feat(kotlin): provide operators through extension functions #11

@davinkevin

Description

@davinkevin

Hi,

First, I want to thank you for providing this library to simplify the integration of JSONB with JOOQ 👍.

My issue is about providing extension functions for Kotlin projects. Now, jooq supports Kotlin from generator to code, so it could be good to be able to use this kind of syntax:

// PODCAST.METADATA is of type Field<JSONB?>
val youtubeField = PODCAST.METADATA.objectAtPathText("youtube", "channelId")

private fun Field<JSONB?>.objectAtPathText(vararg path: String): Field<String> {
    return DSL.field("{0}#>>{1}", String::class.java, this, DSL.array(*path))
}

If you are interested, I can provide a PR for that if you let me know how do you want to proceed to integrate Kotlin code.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy