Package 

Class ExtensionsKt

  • All Implemented Interfaces:

    
    public final class ExtensionsKt
    
                        
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      final static Boolean isKotlinClass(Class<?> $self)
      final static <T extends JdbiConfig<T>> T getConfig(StatementContext $self, KClass<T> kClass) Convenience helper to use KClass<T> for config lookup.
      final static <T extends Any> ResultIterable<T> mapTo(ResultBearing $self)
      final static <O extends Any> Unit useSequence(ResultIterable<O> $self, Function1<Sequence<O>, Unit> block)
      final static <This extends SqlStatement<This>> This bindKotlin(SqlStatement<This> $self, String name, Object obj)
      final static <This extends SqlStatement<This>> This bindKotlin(SqlStatement<This> $self, Object obj)
      final static <This extends Configurable<This>, C extends JdbiConfig<C>> This configure(Configurable<This> $self, KClass<C> configClass, Consumer<C> configurer) Convenience method for {@link Configurable#configure} using Kotlin class syntax.
      final static <E extends Any, R extends Any, X extends Exception> R withExtension(Jdbi $self, KClass<E> extensionType, ExtensionCallback<R, E, X> callback) A convenience method which opens an extension of the given type, yields it to a callback, and returns the result of the callback.
      final static <E extends Any, X extends Exception> Unit useExtension(Jdbi $self, KClass<E> extensionType, ExtensionConsumer<E, X> callback) A convenience method which opens an extension of the given type, and yields it to a callback.
      final static Set<Annotation> getQualifiers(KAnnotatedElement elements) Returns the set of qualifying annotations on the given Kotlin elements.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

    • Method Detail

      • getConfig

         final static <T extends JdbiConfig<T>> T getConfig(StatementContext $self, KClass<T> kClass)

        Convenience helper to use KClass<T> for config lookup.

      • mapTo

         final static <T extends Any> ResultIterable<T> mapTo(ResultBearing $self)
      • bindKotlin

         final static <This extends SqlStatement<This>> This bindKotlin(SqlStatement<This> $self, String name, Object obj)
      • bindKotlin

         final static <This extends SqlStatement<This>> This bindKotlin(SqlStatement<This> $self, Object obj)
      • configure

         final static <This extends Configurable<This>, C extends JdbiConfig<C>> This configure(Configurable<This> $self, KClass<C> configClass, Consumer<C> configurer)

        Convenience method for {@link Configurable#configure} using Kotlin class syntax.

      • withExtension

         final static <E extends Any, R extends Any, X extends Exception> R withExtension(Jdbi $self, KClass<E> extensionType, ExtensionCallback<R, E, X> callback)

        A convenience method which opens an extension of the given type, yields it to a callback, and returns the result of the callback. A handle is opened if needed by the extension, and closed before returning to the caller.

        Parameters:
        extensionType - the type of extension.
        callback - a callback which will receive the extension.
      • useExtension

         final static <E extends Any, X extends Exception> Unit useExtension(Jdbi $self, KClass<E> extensionType, ExtensionConsumer<E, X> callback)

        A convenience method which opens an extension of the given type, and yields it to a callback. A handle is opened if needed by the extention, and closed before returning to the caller.

        Parameters:
        extensionType - the type of extension
        callback - a callback which will receive the extension