/*
 * 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.reactivex.sqlclient;

import java.util.Map;
import io.reactivex.Observable;
import io.reactivex.Flowable;
import io.reactivex.Single;
import io.reactivex.Completable;
import io.reactivex.Maybe;
import java.util.List;

Represents the result of an operation on database.

NOTE: This class has been automatically generated from the original non RX-ified interface using Vert.x codegen.
/** * Represents the result of an operation on database. * * <p/> * NOTE: This class has been automatically generated from the {@link io.vertx.sqlclient.SqlResult original} non RX-ified interface using Vert.x codegen. */
@io.vertx.lang.rx.RxGen(io.vertx.sqlclient.SqlResult.class) public class SqlResult<T> { @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; SqlResult that = (SqlResult) o; return delegate.equals(that.delegate); } @Override public int hashCode() { return delegate.hashCode(); } public static final io.vertx.lang.rx.TypeArg<SqlResult> __TYPE_ARG = new io.vertx.lang.rx.TypeArg<>( obj -> new SqlResult((io.vertx.sqlclient.SqlResult) obj), SqlResult::getDelegate ); private final io.vertx.sqlclient.SqlResult<T> delegate; public final io.vertx.lang.rx.TypeArg<T> __typeArg_0; public SqlResult(io.vertx.sqlclient.SqlResult delegate) { this.delegate = delegate; this.__typeArg_0 = io.vertx.lang.rx.TypeArg.unknown(); } public SqlResult(io.vertx.sqlclient.SqlResult delegate, io.vertx.lang.rx.TypeArg<T> typeArg_0) { this.delegate = delegate; this.__typeArg_0 = typeArg_0; } public io.vertx.sqlclient.SqlResult getDelegate() { return delegate; }
Get the number of the affected rows in the operation to this PgResult.

The meaning depends on the executed statement:
  • INSERT: the number of rows inserted
  • DELETE: the number of rows deleted
  • UPDATE: the number of rows updated
  • SELECT: the number of rows retrieved
Returns:the count of affected rows.
/** * Get the number of the affected rows in the operation to this PgResult. * <p/> * The meaning depends on the executed statement: * <ul> * <li>INSERT: the number of rows inserted</li> * <li>DELETE: the number of rows deleted</li> * <li>UPDATE: the number of rows updated</li> * <li>SELECT: the number of rows retrieved</li> * </ul> * @return the count of affected rows. */
public int rowCount() { int ret = delegate.rowCount(); return ret; }
Get the names of columns in the PgResult.
Returns:the list of names of columns.
/** * Get the names of columns in the PgResult. * @return the list of names of columns. */
public List<String> columnsNames() { List<String> ret = delegate.columnsNames(); return ret; }
Get the number of rows in the PgResult.
Returns:the count of rows.
/** * Get the number of rows in the PgResult. * @return the count of rows. */
public int size() { int ret = delegate.size(); return ret; }
Get the result value.
Returns:the result
/** * Get the result value. * @return the result */
public T value() { T ret = (T)__typeArg_0.wrap(delegate.value()); return ret; }
Return the next available result or null, e.g for a simple query that executed multiple queries or for a batch result.
Returns:the next available result or null if none is available
/** * Return the next available result or <code>null</code>, e.g for a simple query that executed multiple queries or for * a batch result. * @return the next available result or <code>null</code> if none is available */
public io.vertx.reactivex.sqlclient.SqlResult<T> next() { io.vertx.reactivex.sqlclient.SqlResult<T> ret = io.vertx.reactivex.sqlclient.SqlResult.newInstance(delegate.next(), __typeArg_0); return ret; } public static <T>SqlResult<T> newInstance(io.vertx.sqlclient.SqlResult arg) { return arg != null ? new SqlResult<T>(arg) : null; } public static <T>SqlResult<T> newInstance(io.vertx.sqlclient.SqlResult arg, io.vertx.lang.rx.TypeArg<T> __typeArg_T) { return arg != null ? new SqlResult<T>(arg, __typeArg_T) : null; } }