Skip to content

Support for Kysely plugins #292

@bviebahn

Description

@bviebahn

Using Kysely plugins doesn't seem to be properly supported by the react package. I am using the ParseJSONResultsPlugin, and it works when I call execute on the query, but not when I pass the query to the useQuery hook.

I guess this is a bug rather than a feature request, because:

  • The types of wrapPowerSyncWithKysely suggest kysely can be configured as usual using the second config parameter. (On another note: I think the config parameter should be changed to Omit<KyselyConfig, 'dialect'>, since dialect is set by wrapPowerSyncWithKysely and I'm not sure it ever makes sense to override it. At least it should be optional)
  • Kysely seems to assume specific plugins to be used. For example jsonArrayFrom and jsonObjectFrom assume to be used with ParseJSONResultsPlugin, so the types will be wrong if the plugin doesn't work.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions