Class SpigotASQLContext.ContextBuilder

    • Method Detail

      • setPlugin

        public SpigotASQLContext.ContextBuilder setPlugin​(@NotNull
                                                          org.bukkit.plugin.java.JavaPlugin javaPlugin)
        Sets the JavaPlugin which created this SpigotASQLContext.
        Parameters:
        javaPlugin - the EXISTING JavaPlugin which created this SpigotASQLContext
        Returns:
        This ContextBuilder instance
      • setCredentials

        public SpigotASQLContext.ContextBuilder setCredentials​(@NotNull
                                                               com.glyart.asql.common.database.DataSourceCredentials credentials)
        Sets the given credentials for connecting to a data source.
        Parameters:
        credentials - The credentials for connecting to a data source
        Returns:
        This ContextBuilder instance
      • setDatabaseHandler

        public SpigotASQLContext.ContextBuilder setDatabaseHandler​(@Nullable
                                                                   com.glyart.asql.common.database.DataSourceHandler dataSourceHandler)
        Sets the handler for the data source interaction. If it's not provided then a Hikari based default implementation will be used.
        Parameters:
        dataSourceHandler - The handler for the data source interaction.
        Returns:
        This ContextBuilder instance
        See Also:
        DefaultDataSourceHandler
      • build

        @NotNull
        public SpigotASQLContext build()
        Builds a new SpigotASQLContext.
        Returns:
        a new instance of SpigotASQLContext