mirror of
https://github.com/querydsl/querydsl.git
synced 2026-07-06 21:05:50 +08:00
38 lines
995 B
Java
38 lines
995 B
Java
package com.mysema.query;
|
|
|
|
import java.sql.Connection;
|
|
import java.sql.ResultSet;
|
|
import java.sql.SQLException;
|
|
import java.sql.Statement;
|
|
|
|
import org.junit.After;
|
|
import org.junit.Ignore;
|
|
import org.junit.Test;
|
|
|
|
@Ignore
|
|
public class OracleTimeTest {
|
|
|
|
@After
|
|
public void tearDown() throws SQLException {
|
|
Connections.close();
|
|
}
|
|
|
|
@Test
|
|
public void test() throws ClassNotFoundException, SQLException {
|
|
Connections.initOracle();
|
|
Connection conn = Connections.getConnection();
|
|
Statement stmt = conn.createStatement();
|
|
ResultSet rs = stmt.executeQuery("select timefield from employee");
|
|
rs.next();
|
|
Object o = rs.getObject(1);
|
|
System.err.println(o.getClass().getName() + ": " + o);
|
|
o = rs.getTimestamp(1);
|
|
System.err.println(o.getClass().getName() + ": " + o);
|
|
o = rs.getTime(1);
|
|
System.err.println(o.getClass().getName() + ": " + o);
|
|
rs.close();
|
|
stmt.close();
|
|
}
|
|
|
|
}
|