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

io.vertx.rxjava.sqlclient.Row Maven / Gradle / Ivy

There is a newer version: 5.0.0.CR2
Show newest version
/*
 * Copyright 2014 Red Hat, Inc.
 *
 * Red Hat licenses this file to you under the Apache License, version 2.0
 * (the "License"); you may not use this file except in compliance with the
 * License.  You may obtain a copy of the License at:
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
 * License for the specific language governing permissions and limitations
 * under the License.
 */

package io.vertx.rxjava.sqlclient;

import rx.Observable;
import rx.Single;
import io.vertx.rx.java.RxHelper;
import io.vertx.rx.java.WriteStreamSubscriber;
import io.vertx.rx.java.SingleOnSubscribeAdapter;
import java.util.Map;
import java.util.Set;
import java.util.List;
import java.util.Iterator;
import java.util.function.Function;
import java.util.stream.Collectors;
import io.vertx.core.Handler;
import io.vertx.core.AsyncResult;
import io.vertx.core.json.JsonObject;
import io.vertx.core.json.JsonArray;
import io.vertx.lang.rx.RxGen;
import io.vertx.lang.rx.TypeArg;
import io.vertx.lang.rx.MappingIterator;

/**
 * A single row of the {@link io.vertx.rxjava.sqlclient.RowSet execution result rowset}.
 *
 * 

* NOTE: This class has been automatically generated from the {@link io.vertx.sqlclient.Row original} non RX-ified interface using Vert.x codegen. */ @RxGen(io.vertx.sqlclient.Row.class) public class Row extends io.vertx.rxjava.sqlclient.Tuple { @Override public String toString() { return delegate.toString(); } @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; Row that = (Row) o; return delegate.equals(that.delegate); } @Override public int hashCode() { return delegate.hashCode(); } public static final TypeArg __TYPE_ARG = new TypeArg<>( obj -> new Row((io.vertx.sqlclient.Row) obj), Row::getDelegate ); private final io.vertx.sqlclient.Row delegate; public Row(io.vertx.sqlclient.Row delegate) { super(delegate); this.delegate = delegate; } public Row(Object delegate) { super((io.vertx.sqlclient.Row)delegate); this.delegate = (io.vertx.sqlclient.Row)delegate; } public io.vertx.sqlclient.Row getDelegate() { return delegate; } /** * Get a column name at pos. * @param pos the column position * @return the column name or null */ public String getColumnName(int pos) { String ret = delegate.getColumnName(pos); return ret; } /** * Get a column position for the given @code column}. * @param column the column name * @return the column name or -1 if not found */ public int getColumnIndex(String column) { int ret = delegate.getColumnIndex(column); return ret; } /** * Get a value for the given column. * @param column the column name * @return the column value */ public java.lang.Object getValue(String column) { java.lang.Object ret = (Object) delegate.getValue(column); return ret; } /** * Get a boolean value for the given column. * @param column the column name * @return the column value */ public Boolean getBoolean(String column) { Boolean ret = delegate.getBoolean(column); return ret; } /** * Get a short value for the given column. * @param column the column name * @return the column value */ public Short getShort(String column) { Short ret = delegate.getShort(column); return ret; } /** * Get an integer value for the given column. * @param column the column name * @return the column value */ public Integer getInteger(String column) { Integer ret = delegate.getInteger(column); return ret; } /** * Get a long value for the given column. * @param column the column name * @return the column value */ public Long getLong(String column) { Long ret = delegate.getLong(column); return ret; } /** * Get a float value for the given column. * @param column the column name * @return the column value */ public Float getFloat(String column) { Float ret = delegate.getFloat(column); return ret; } /** * Get a double value for the given column. * @param column the column name * @return the column value */ public Double getDouble(String column) { Double ret = delegate.getDouble(column); return ret; } /** * Get a string value for the given column. * @param column the column name * @return the column value */ public String getString(String column) { String ret = delegate.getString(column); return ret; } /** * Get a value for the given column. * @param column the column name * @return the column value */ public JsonObject getJsonObject(String column) { JsonObject ret = delegate.getJsonObject(column); return ret; } /** * Get a value for the given column. * @param column the column name * @return the column value */ public JsonArray getJsonArray(String column) { JsonArray ret = delegate.getJsonArray(column); return ret; } /** * Get a buffer value for the given column. * @param column the column name * @return the column value */ public io.vertx.rxjava.core.buffer.Buffer getBuffer(String column) { io.vertx.rxjava.core.buffer.Buffer ret = io.vertx.rxjava.core.buffer.Buffer.newInstance((io.vertx.core.buffer.Buffer)delegate.getBuffer(column)); return ret; } /** * Like {@link io.vertx.rxjava.sqlclient.Tuple#get} but specifying the column instead of the position. * @param type * @param column * @return */ public T get(java.lang.Class type, String column) { T ret = (T)TypeArg.of(type).wrap(delegate.get(io.vertx.lang.rxjava.Helper.unwrap(type), column)); return ret; } /** * Return a JSON object representation of the row. * *

Column names are mapped to JSON keys. * *

The following rules are applied for the column values: * *

    *
  • number, boolean and string are preserved
  • *
  • the null value is preserved
  • *
  • JSON elements are preserved
  • *
  • Buffer are converted to base64 encoded strings
  • *
  • array is mapped JsonArray
  • *
  • otherwise the type converted to a string
  • *
* @return the json representation */ public JsonObject toJson() { JsonObject ret = delegate.toJson(); return ret; } /** * Get value for the given column. * @param column the column * @return the column value */ public io.vertx.sqlclient.data.Numeric getNumeric(String column) { io.vertx.sqlclient.data.Numeric ret = delegate.getNumeric(column); return ret; } /** * Get a temporal value for the given column. * @param column the column name * @return the column value */ public java.time.temporal.Temporal getTemporal(String column) { java.time.temporal.Temporal ret = delegate.getTemporal(column); return ret; } /** * Get {@link java.time.LocalDate} value for the given column. * @param column the column name * @return the column value */ public java.time.LocalDate getLocalDate(String column) { java.time.LocalDate ret = delegate.getLocalDate(column); return ret; } /** * Get {@link java.time.LocalTime} value for the given column. * @param column the column name * @return the column value */ public java.time.LocalTime getLocalTime(String column) { java.time.LocalTime ret = delegate.getLocalTime(column); return ret; } /** * Get {@link java.time.LocalDateTime} value for the given column. * @param column the column name * @return the column value */ public java.time.LocalDateTime getLocalDateTime(String column) { java.time.LocalDateTime ret = delegate.getLocalDateTime(column); return ret; } /** * Get {@link java.time.OffsetTime} value for the given column. * @param column the column name * @return the column value */ public java.time.OffsetTime getOffsetTime(String column) { java.time.OffsetTime ret = delegate.getOffsetTime(column); return ret; } /** * Get {@link java.time.OffsetDateTime} value for the given column. * @param column the column name * @return the column value */ public java.time.OffsetDateTime getOffsetDateTime(String column) { java.time.OffsetDateTime ret = delegate.getOffsetDateTime(column); return ret; } /** * Get {@link java.util.UUID} value for the given column. * @param column the column name * @return the column value */ public java.util.UUID getUUID(String column) { java.util.UUID ret = delegate.getUUID(column); return ret; } /** * Get value for the given column. * @param column the column name * @return the column value */ public java.math.BigDecimal getBigDecimal(String column) { java.math.BigDecimal ret = delegate.getBigDecimal(column); return ret; } /** * Get an array of {@link java.lang.Boolean} value for the given column. * @param column the column name * @return the column value */ public java.lang.Boolean[] getBooleanArray(String column) { java.lang.Boolean[] ret = delegate.getBooleanArray(column); return ret; } /** * Get an array of {@link java.lang.Short} value for the given column. * @param column the column name * @return the column value */ public java.lang.Short[] getShortArray(String column) { java.lang.Short[] ret = delegate.getShortArray(column); return ret; } /** * Get an array of {@link java.lang.Integer} value for the given column. * @param column the column name * @return the column value */ public java.lang.Integer[] getIntegerArray(String column) { java.lang.Integer[] ret = delegate.getIntegerArray(column); return ret; } /** * Get an array of {@link java.lang.Long} value for the given column. * @param column the column name * @return the column value */ public java.lang.Long[] getLongArray(String column) { java.lang.Long[] ret = delegate.getLongArray(column); return ret; } /** * Get an array of {@link java.lang.Float} value for the given column. * @param column the column name * @return the column value */ public java.lang.Float[] getFloatArray(String column) { java.lang.Float[] ret = delegate.getFloatArray(column); return ret; } /** * Get an array of {@link java.lang.Double} value for the given column. * @param column the column name * @return the column value */ public java.lang.Double[] getDoubleArray(String column) { java.lang.Double[] ret = delegate.getDoubleArray(column); return ret; } /** * Get an array of value for the given column. * @param column the column * @return the column value */ public io.vertx.sqlclient.data.Numeric[] getNumericArray(String column) { io.vertx.sqlclient.data.Numeric[] ret = delegate.getNumericArray(column); return ret; } /** * Get an array of {@link java.lang.String} value for the given column. * @param column the column name * @return the column value */ public java.lang.String[] getStringArray(String column) { java.lang.String[] ret = delegate.getStringArray(column); return ret; } /** * Get an array of value for the given column. * @param column the column name * @return the column value */ public io.vertx.core.json.JsonObject[] getJsonObjectArray(String column) { io.vertx.core.json.JsonObject[] ret = delegate.getJsonObjectArray(column); return ret; } /** * Get an array of value for the given column. * @param column the column name * @return the column value */ public io.vertx.core.json.JsonArray[] getJsonArrayArray(String column) { io.vertx.core.json.JsonArray[] ret = delegate.getJsonArrayArray(column); return ret; } /** * Get an array of value for the given column. * @param column the column name * @return the column value */ public java.time.temporal.Temporal[] getTemporalArray(String column) { java.time.temporal.Temporal[] ret = delegate.getTemporalArray(column); return ret; } /** * Get an array of value for the given column. * @param column the column name * @return the column value */ public java.time.LocalDate[] getLocalDateArray(String column) { java.time.LocalDate[] ret = delegate.getLocalDateArray(column); return ret; } /** * Get an array of value for the given column. * @param column the column name * @return the column value */ public java.time.LocalTime[] getLocalTimeArray(String column) { java.time.LocalTime[] ret = delegate.getLocalTimeArray(column); return ret; } /** * Get an array of value for the given column. * @param column the column name * @return the column value */ public java.time.LocalDateTime[] getLocalDateTimeArray(String column) { java.time.LocalDateTime[] ret = delegate.getLocalDateTimeArray(column); return ret; } /** * Get an array of value for the given column. * @param column the column name * @return the column value */ public java.time.OffsetTime[] getOffsetTimeArray(String column) { java.time.OffsetTime[] ret = delegate.getOffsetTimeArray(column); return ret; } /** * Get an array of value for the given column. * @param column the column name * @return the column value */ public java.time.OffsetDateTime[] getOffsetDateTimeArray(String column) { java.time.OffsetDateTime[] ret = delegate.getOffsetDateTimeArray(column); return ret; } /** * Get an array of value for the given column. * @param column the column name * @return the column value */ public java.util.UUID[] getUUIDArray(String column) { java.util.UUID[] ret = delegate.getUUIDArray(column); return ret; } /** * Get an array of value for the given column. * @param column the column name * @return the column value */ public java.math.BigDecimal[] getBigDecimalArray(String column) { java.math.BigDecimal[] ret = delegate.getBigDecimalArray(column); return ret; } /** * The JSON null literal value. *
* It is used to distinguish a JSON null literal value from the Java null value. This is only * used when the database supports JSON types. */ public static final java.lang.Object JSON_NULL = (Object) io.vertx.sqlclient.Row.JSON_NULL; public static Row newInstance(io.vertx.sqlclient.Row arg) { return arg != null ? new Row(arg) : null; } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy