@Test public void testCreateSchema() throws ClassNotFoundException, SQLException { final Statement st = con.createStatement(); st.executeUpdate("insert into restaurants values (1, 'Irifunes', 'San Mateo')"); st.executeUpdate("insert into restaurants values (2, 'Estradas', 'Daly City')"); st.executeUpdate("insert into restaurants values (3, 'Prime Rib House', 'San Francisco')"); final ResultSet resultSet = st.executeQuery("select * from restaurants"); final Schema schema = JdbcCommon.createSchema(resultSet); assertNotNull(schema); assertEquals("RESTAURANTS", schema.getName()); assertNotNull(schema.getField("ID")); assertNotNull(schema.getField("NAME")); assertNotNull(schema.getField("CITY")); st.close(); }
public static Schema createSchema(final ResultSet rs) throws SQLException { return createSchema(rs, null, false); }
JdbcCommon { public static Schema createSchema(final ResultSet rs) throws SQLException { return createSchema(rs, null, false); } }
JdbcCommon { public static Schema createSchema(final ResultSet rs) throws SQLException { return createSchema(rs, null, false); }  }
JdbcCommon { public static Schema createSchema(final ResultSet rs) throws SQLException { return createSchema(rs, null, false); }  static long convertToAvroStream(final ResultSet rs, final OutputStream outStream, boolean convertNames); static long convertToAvroStream(final ResultSet rs, final OutputStream outStream, String recordName, boolean convertNames); static long convertToAvroStream(final ResultSet rs, final OutputStream outStream, String recordName, ResultSetRowCallback callback, boolean convertNames); static long convertToAvroStream(final ResultSet rs, final OutputStream outStream, String recordName, ResultSetRowCallback callback, final int maxRows, boolean convertNames); static Schema createSchema(final ResultSet rs); static Schema createSchema(final ResultSet rs, String recordName, boolean convertNames); static String normalizeNameForAvro(String inputName); }
JdbcCommon { public static Schema createSchema(final ResultSet rs) throws SQLException { return createSchema(rs, null, false); }  static long convertToAvroStream(final ResultSet rs, final OutputStream outStream, boolean convertNames); static long convertToAvroStream(final ResultSet rs, final OutputStream outStream, String recordName, boolean convertNames); static long convertToAvroStream(final ResultSet rs, final OutputStream outStream, String recordName, ResultSetRowCallback callback, boolean convertNames); static long convertToAvroStream(final ResultSet rs, final OutputStream outStream, String recordName, ResultSetRowCallback callback, final int maxRows, boolean convertNames); static Schema createSchema(final ResultSet rs); static Schema createSchema(final ResultSet rs, String recordName, boolean convertNames); static String normalizeNameForAvro(String inputName);  }