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

Wiki documentation is outdated: Plugin is no longer an spi interface #1737

Open
jpschorr opened this issue Feb 5, 2025 · 0 comments
Open

Comments

@jpschorr
Copy link
Contributor

jpschorr commented Feb 5, 2025

## Step 3: Implement the Plugin Interface
Next, you need to implement the `Plugin` interface in your code. This allows you to return a list of all the custom `PartiQLFunction` implementations you've created, using the `getFunctions()` method. This step is crucial as it allows the service loader to retrieve all your custom functions.
Here's an example of a `Plugin` implementation:
```Kotlin
package org.partiql.plugins.mockdb
import org.partiql.spi.Plugin
import org.partiql.spi.connector.Connector
import org.partiql.spi.function.PartiQLFunction
public class LocalPlugin implements Plugin {
override fun getConnectorFactories(): List<Connector.Factory> = listOf()
@PartiQLFunctionExperimental
override fun getFunctions(): List<PartiQLFunction> = listOf(
TrimLead // Specify the functions
)
}
```

@jpschorr jpschorr changed the title Plugin is no longer an spi interface Wiki documentation is outdated: Plugin is no longer an spi interface Feb 5, 2025
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

1 participant