All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.vertx.groovy.ext.sql.SQLClient_GroovyExtension Maven / Gradle / Ivy

package io.vertx.groovy.ext.sql;
public class SQLClient_GroovyExtension {
  public static io.vertx.ext.sql.SQLOperations querySingle(io.vertx.ext.sql.SQLClient j_receiver, java.lang.String sql, io.vertx.core.Handler>> handler) {
    io.vertx.core.impl.ConversionHelper.fromObject(j_receiver.querySingle(sql,
      handler != null ? new io.vertx.core.Handler>() {
      public void handle(io.vertx.core.AsyncResult ar) {
        handler.handle(ar.map(event -> io.vertx.core.impl.ConversionHelper.fromJsonArray(event)));
      }
    } : null));
    return j_receiver;
  }
  public static io.vertx.ext.sql.SQLOperations querySingleWithParams(io.vertx.ext.sql.SQLClient j_receiver, java.lang.String sql, java.util.List arguments, io.vertx.core.Handler>> handler) {
    io.vertx.core.impl.ConversionHelper.fromObject(j_receiver.querySingleWithParams(sql,
      arguments != null ? io.vertx.core.impl.ConversionHelper.toJsonArray(arguments) : null,
      handler != null ? new io.vertx.core.Handler>() {
      public void handle(io.vertx.core.AsyncResult ar) {
        handler.handle(ar.map(event -> io.vertx.core.impl.ConversionHelper.fromJsonArray(event)));
      }
    } : null));
    return j_receiver;
  }
  public static io.vertx.ext.sql.SQLClient query(io.vertx.ext.sql.SQLClient j_receiver, java.lang.String sql, io.vertx.core.Handler>> handler) {
    io.vertx.core.impl.ConversionHelper.fromObject(j_receiver.query(sql,
      handler != null ? new io.vertx.core.Handler>() {
      public void handle(io.vertx.core.AsyncResult ar) {
        handler.handle(ar.map(event -> event != null ? io.vertx.core.impl.ConversionHelper.fromJsonObject(event.toJson()) : null));
      }
    } : null));
    return j_receiver;
  }
  public static io.vertx.ext.sql.SQLClient queryWithParams(io.vertx.ext.sql.SQLClient j_receiver, java.lang.String sql, java.util.List arguments, io.vertx.core.Handler>> handler) {
    io.vertx.core.impl.ConversionHelper.fromObject(j_receiver.queryWithParams(sql,
      arguments != null ? io.vertx.core.impl.ConversionHelper.toJsonArray(arguments) : null,
      handler != null ? new io.vertx.core.Handler>() {
      public void handle(io.vertx.core.AsyncResult ar) {
        handler.handle(ar.map(event -> event != null ? io.vertx.core.impl.ConversionHelper.fromJsonObject(event.toJson()) : null));
      }
    } : null));
    return j_receiver;
  }
  public static io.vertx.ext.sql.SQLClient update(io.vertx.ext.sql.SQLClient j_receiver, java.lang.String sql, io.vertx.core.Handler>> handler) {
    io.vertx.core.impl.ConversionHelper.fromObject(j_receiver.update(sql,
      handler != null ? new io.vertx.core.Handler>() {
      public void handle(io.vertx.core.AsyncResult ar) {
        handler.handle(ar.map(event -> event != null ? io.vertx.core.impl.ConversionHelper.fromJsonObject(event.toJson()) : null));
      }
    } : null));
    return j_receiver;
  }
  public static io.vertx.ext.sql.SQLClient updateWithParams(io.vertx.ext.sql.SQLClient j_receiver, java.lang.String sql, java.util.List params, io.vertx.core.Handler>> handler) {
    io.vertx.core.impl.ConversionHelper.fromObject(j_receiver.updateWithParams(sql,
      params != null ? io.vertx.core.impl.ConversionHelper.toJsonArray(params) : null,
      handler != null ? new io.vertx.core.Handler>() {
      public void handle(io.vertx.core.AsyncResult ar) {
        handler.handle(ar.map(event -> event != null ? io.vertx.core.impl.ConversionHelper.fromJsonObject(event.toJson()) : null));
      }
    } : null));
    return j_receiver;
  }
  public static io.vertx.ext.sql.SQLClient call(io.vertx.ext.sql.SQLClient j_receiver, java.lang.String sql, io.vertx.core.Handler>> handler) {
    io.vertx.core.impl.ConversionHelper.fromObject(j_receiver.call(sql,
      handler != null ? new io.vertx.core.Handler>() {
      public void handle(io.vertx.core.AsyncResult ar) {
        handler.handle(ar.map(event -> event != null ? io.vertx.core.impl.ConversionHelper.fromJsonObject(event.toJson()) : null));
      }
    } : null));
    return j_receiver;
  }
  public static io.vertx.ext.sql.SQLClient callWithParams(io.vertx.ext.sql.SQLClient j_receiver, java.lang.String sql, java.util.List params, java.util.List outputs, io.vertx.core.Handler>> handler) {
    io.vertx.core.impl.ConversionHelper.fromObject(j_receiver.callWithParams(sql,
      params != null ? io.vertx.core.impl.ConversionHelper.toJsonArray(params) : null,
      outputs != null ? io.vertx.core.impl.ConversionHelper.toJsonArray(outputs) : null,
      handler != null ? new io.vertx.core.Handler>() {
      public void handle(io.vertx.core.AsyncResult ar) {
        handler.handle(ar.map(event -> event != null ? io.vertx.core.impl.ConversionHelper.fromJsonObject(event.toJson()) : null));
      }
    } : null));
    return j_receiver;
  }
}