com.julienviet.rxjava.pgclient.PgResult Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of reactive-pg-client Show documentation
Show all versions of reactive-pg-client Show documentation
The reactive Postgres client
/*
* 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 com.julienviet.rxjava.pgclient;
import java.util.Map;
import rx.Observable;
import rx.Single;
import java.util.List;
/**
* Represents the result of an operation on database.
*
*
* NOTE: This class has been automatically generated from the {@link com.julienviet.pgclient.PgResult original} non RX-ified interface using Vert.x codegen.
*/
@io.vertx.lang.rxjava.RxGen(com.julienviet.pgclient.PgResult.class)
public class PgResult {
@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;
PgResult that = (PgResult) o;
return delegate.equals(that.delegate);
}
@Override
public int hashCode() {
return delegate.hashCode();
}
public static final io.vertx.lang.rxjava.TypeArg __TYPE_ARG = new io.vertx.lang.rxjava.TypeArg<>(
obj -> new PgResult((com.julienviet.pgclient.PgResult) obj),
PgResult::getDelegate
);
private final com.julienviet.pgclient.PgResult delegate;
public final io.vertx.lang.rxjava.TypeArg __typeArg_0;
public PgResult(com.julienviet.pgclient.PgResult delegate) {
this.delegate = delegate;
this.__typeArg_0 = io.vertx.lang.rxjava.TypeArg.unknown();
}
public PgResult(com.julienviet.pgclient.PgResult delegate, io.vertx.lang.rxjava.TypeArg typeArg_0) {
this.delegate = delegate;
this.__typeArg_0 = typeArg_0;
}
public com.julienviet.pgclient.PgResult getDelegate() {
return delegate;
}
/**
* Get the number of the affected rows in the operation to this PgResult.
* @return the count of affected rows.
*/
public int updatedCount() {
int ret = delegate.updatedCount();
return ret;
}
/**
* Get the names of columns in the PgResult.
* @return the list of names of columns.
*/
public List columnsNames() {
List ret = delegate.columnsNames();
return ret;
}
/**
* Get the number of rows in the PgResult.
* @return the count of rows.
*/
public int size() {
int ret = delegate.size();
return ret;
}
/**
* Get the iterator of the PgResult.
* @return the iterator.
*/
public PgIterator iterator() {
PgIterator ret = PgIterator.newInstance(delegate.iterator(), __typeArg_0);
return ret;
}
/**
* Return the next available result or null
, e.g for a simple query that executed multiple queries or for
* a batch result.
* @return the next available result or null
if none is available
*/
public PgResult next() {
PgResult ret = PgResult.newInstance(delegate.next(), __typeArg_0);
return ret;
}
public static PgResult newInstance(com.julienviet.pgclient.PgResult arg) {
return arg != null ? new PgResult(arg) : null;
}
public static PgResult newInstance(com.julienviet.pgclient.PgResult arg, io.vertx.lang.rxjava.TypeArg __typeArg_T) {
return arg != null ? new PgResult(arg, __typeArg_T) : null;
}
}