当前位置: 首页>>代码示例>>Java>>正文


Java SQLInput类代码示例

本文整理汇总了Java中java.sql.SQLInput的典型用法代码示例。如果您正苦于以下问题:Java SQLInput类的具体用法?Java SQLInput怎么用?Java SQLInput使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


SQLInput类属于java.sql包,在下文中一共展示了SQLInput类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: readSQL

import java.sql.SQLInput; //导入依赖的package包/类
@Override
public void readSQL(SQLInput stream, String typeName) throws SQLException {

    sqlType = typeName;
    types[stringPos] = stream.readString();
    types[datePos] = stream.readDate();
    types[timePos] = stream.readTime();
    types[timestampPos] = stream.readTimestamp();
    types[intPos] = stream.readInt();
    types[longPos] = stream.readLong();
    types[shortPos] = stream.readShort();
    types[bigDecimalPos] = stream.readBigDecimal();
    types[doublePos] = stream.readDouble();
    types[booleanPos] = stream.readBoolean();
    types[floatPos] = stream.readFloat();
    types[bytePos] = stream.readByte();
    types[bytesPos] = stream.readBytes();
}
 
开发者ID:lambdalab-mirror,项目名称:jdk8u-jdk,代码行数:19,代码来源:TestSQLDataImpl.java

示例2: readSQL

import java.sql.SQLInput; //导入依赖的package包/类
@Override
public void readSQL(SQLInput stream, String typeName) throws SQLException {
    first = stream.readString();
    last = stream.readString();
    firstYear = stream.readInt();
    secretIdentity = stream.readString();
}
 
开发者ID:lambdalab-mirror,项目名称:jdk8u-jdk,代码行数:8,代码来源:SuperHero.java

示例3: readSQL

import java.sql.SQLInput; //导入依赖的package包/类
@Override
public void readSQL(SQLInput stream, String typeName) throws SQLException {
	this.typeName= typeName;
	this.tableName=stream.readString();
	this.columnName= stream.readString();
	this.columnValue=stream.readObject();
}
 
开发者ID:gagoyal01,项目名称:mongodb-rdbms-sync,代码行数:8,代码来源:O2MSyncEventLog.java

示例4: readSQL

import java.sql.SQLInput; //导入依赖的package包/类
public void readSQL( SQLInput stream, String typname) throws SQLException {
	this.typname = typname;
	int i = 0;
	for ( ;; ++i )
		try {
			stream.readByte();
		}
		catch ( SQLException sqle ) {
			if ( "22P03".equals( sqle.getSQLState()) )
				break;
			throw sqle;
		}
	apop = i;
}
 
开发者ID:greenplum-db,项目名称:pljava,代码行数:15,代码来源:VarlenaUDTTest.java

示例5: readSQL

import java.sql.SQLInput; //导入依赖的package包/类
@Override
public void readSQL(SQLInput stream, String typeName) throws SQLException {
	m_typeName = typeName;
	m_x = stream.readDouble();
	m_y = stream.readDouble();
	s_logger.info(typeName + " from SQLInput");
}
 
开发者ID:greenplum-db,项目名称:pljava,代码行数:8,代码来源:ComplexTuple.java

示例6: readSQL

import java.sql.SQLInput; //导入依赖的package包/类
@Function(effects=IMMUTABLE, onNullInput=RETURNS_NULL)
@Override
public void readSQL(SQLInput stream, String typeName) throws SQLException {
	s_logger.info(typeName + " from SQLInput");
	m_x = stream.readDouble();
	m_y = stream.readDouble();
	m_typeName = typeName;
}
 
开发者ID:greenplum-db,项目名称:pljava,代码行数:9,代码来源:ComplexScalar.java

示例7: readSQL

import java.sql.SQLInput; //导入依赖的package包/类
@Override
public void readSQL(SQLInput stream, String typeName) throws SQLException {
	s_logger.info(typeName + " from SQLInput");
	m_x = stream.readDouble();
	m_y = stream.readDouble();
	m_typeName = typeName;
}
 
开发者ID:greenplum-db,项目名称:pljava,代码行数:8,代码来源:Point.java

示例8: mungeProcessChildPositionOffset

import java.sql.SQLInput; //导入依赖的package包/类
/**
 * This is the position offset for different child types. The types are
 * broken into {@link SQLInputStep}s, {@link MungeResultStep}s, and the rest
 * of the munge steps.
 */
public int mungeProcessChildPositionOffset(Class<? extends SPObject> childType) {
	if (MungeResultStep.class.isAssignableFrom(childType)) {
		return 0;
	}
       if (SQLInput.class.isAssignableFrom(childType)) return (resultStep == null? 0 : 1);
       if (MungeStep.class.isAssignableFrom(childType)) {
       	return getInputSteps().size() + (resultStep == null? 0 : 1);
       }
       throw new IllegalArgumentException(childType.getName() + 
               " is not a valid child type of " + getClass().getName());
   }
 
开发者ID:SQLPower,项目名称:power-matchmaker,代码行数:17,代码来源:MungeProcess.java

示例9: testReadSQL

import java.sql.SQLInput; //导入依赖的package包/类
/**
 * Test method for {@link java.sql.SQLData#readSQL(java.sql.SQLInput, java.lang.String)}.
 */
@TestTargetNew(
  level = TestLevel.NOT_FEASIBLE,
  notes = "",
      method = "readSQL",
      args = {SQLInput.class, String.class}
    )
public void testReadSQL() {
    fail("Not yet implemented");
}
 
开发者ID:keplersj,项目名称:In-the-Box-Fork,代码行数:13,代码来源:SQLDataTest.java

示例10: readSQL

import java.sql.SQLInput; //导入依赖的package包/类
/**
 * Read object from SQLInput stream.
 */
public void readSQL(SQLInput stream, String typeName) throws SQLException {
    long n = stream.readLong();
    long d = stream.readLong();
    this.value = new Rational(n, d);
    this.typeName = typeName;
}
 
开发者ID:beargiles,项目名称:pljava-udt-type-extension,代码行数:10,代码来源:RationalUDT.java

示例11: readSQL

import java.sql.SQLInput; //导入依赖的package包/类
/**
 * Read object from SQLInput stream.
 */
public void readSQL(SQLInput stream, String typeName) throws SQLException {
    double re = stream.readDouble();
    double im = stream.readDouble();
    this.value = new Complex(re, im);
    this.typeName = typeName;
}
 
开发者ID:beargiles,项目名称:pljava-udt-type-extension,代码行数:10,代码来源:ComplexUDT.java

示例12: readSQL

import java.sql.SQLInput; //导入依赖的package包/类
public void readSQL(SQLInput stream, String typeName)
        throws SQLException {
    firstAttribute = stream.readString();
    secondAttribute = stream.readBoolean();
    thirdAttribute = stream.readString();
    fourthAttribute = stream.readInt();
}
 
开发者ID:shannah,项目名称:cn1,代码行数:8,代码来源:SQLInputImplTest.java

示例13: readSQL

import java.sql.SQLInput; //导入依赖的package包/类
public void readSQL( SQLInput in, String typeName ) throws SQLException
{
    _data = in.readBytes();
}
 
开发者ID:gemxd,项目名称:gemfirexd-oss,代码行数:5,代码来源:SampleSQLData.java

示例14: readSQL

import java.sql.SQLInput; //导入依赖的package包/类
@Function(effects=IMMUTABLE, onNullInput=RETURNS_NULL)
@Override
public void readSQL(SQLInput stream, String typeName) throws SQLException
{
	m_typeName = typeName;

	if ( ! s_bigdec.equals(stream.readBigDecimal()) )
		throw new SQLException("BigDecimal mismatch");
	ByteArrayOutputStream baos = new ByteArrayOutputStream();
	InputStream is = stream.readBinaryStream();
	try
	{
		for ( int b ; -1 != (b = is.read()) ; )
			baos.write(b);
	}
	catch ( IOException e )
	{
		throw new SQLException("Reading binary stream",
			"58030", e);
	}
	if ( ! Arrays.equals(s_utfgedicht, baos.toByteArray()) )
		throw new SQLException("binaryStream mismatch");
	if ( s_bool != stream.readBoolean() )
		throw new SQLException("boolean mismatch");
	if ( s_byte != stream.readByte() )
		throw new SQLException("byte mismatch");
	if ( ! Arrays.equals(s_utfgedicht, stream.readBytes()) )
		throw new SQLException("bytes mismatch");
	String charstream = new Scanner(stream.readCharacterStream())
		.useDelimiter("\\A").next();
	if ( ! s_gedicht.equals(charstream) )
		throw new SQLException("characterStream mismatch");
	if ( ! s_date.equals(stream.readDate()) )
		throw new SQLException("date mismatch");
	if ( s_double != stream.readDouble() )
		throw new SQLException("double mismatch");
	if ( s_float != stream.readFloat() )
		throw new SQLException("float mismatch");
	if ( s_int != stream.readInt() )
		throw new SQLException("int mismatch");
	if ( s_long != stream.readLong() )
		throw new SQLException("long mismatch");
	if ( s_short != stream.readShort() )
		throw new SQLException("short mismatch");
	if ( ! s_gedicht.equals(stream.readString()) )
		throw new SQLException("string mismatch");
	if ( ! s_time.equals(stream.readTime()) )
		throw new SQLException("time mismatch");
	if ( ! s_timestamp.equals(stream.readTimestamp()) )
		throw new SQLException("timestamp mismatch");
	if ( ! s_url.equals(stream.readURL()) )
		throw new SQLException("url mismatch");
}
 
开发者ID:greenplum-db,项目名称:pljava,代码行数:54,代码来源:UDTScalarIOTest.java

示例15: readSQL

import java.sql.SQLInput; //导入依赖的package包/类
@Function(effects=IMMUTABLE, onNullInput=RETURNS_NULL)
@Override
public void readSQL(SQLInput stream, String typeName) throws SQLException {
	m_value = stream.readInt();
	m_typeName = typeName;
}
 
开发者ID:greenplum-db,项目名称:pljava,代码行数:7,代码来源:IntWithMod.java


注:本文中的java.sql.SQLInput类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。