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

me.icymint.libra.jdbc.result.ScalarResult Maven / Gradle / Ivy

package me.icymint.libra.jdbc.result;

import java.sql.ResultSet;
import java.sql.SQLException;

import me.icymint.libra.jdbc.JdbcAccessException;

/**
 * 标量结果。
 * 
 * @author Daniel Yu
 * @since 2013-3-14
 * 
 * @param 
 *            只返回一条查询记录。
 */
public class ScalarResult extends AbstractResult {

	public ScalarResult(ResultMap rm) {
		super(rm);
	}

	@Override
	public T handle(ResultSet rs) {
		try {
			if (rs.next()) {
				return this.handle(rs, 1);
			}
			return null;
		} catch (SQLException e) {
			throw new JdbcAccessException(e);
		}
	}

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy