Mercurial Hosting > nabble
view src/fschmidt/db/NoKeySetter.java @ 69:4bc1fc540265 default tip
update luan
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Sun, 05 Oct 2025 20:45:39 -0600 |
parents | 00520880ad02 |
children |
line wrap: on
line source
package fschmidt.db; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Connection; import java.sql.Statement; import java.util.Collection; import java.util.Iterator; import fschmidt.db.DbKey; import fschmidt.db.DbKeySetter; import fschmidt.db.DbObject; import fschmidt.db.NoKey; import fschmidt.db.DbArcana; import fschmidt.db.DbRecord; public enum NoKeySetter implements DbKeySetter<NoKey> { INSTANCE; public PreparedStatement prepareStatement(Connection con,NoKey key,String sql,int keyIndex) throws SQLException { PreparedStatement stmt = con.prepareStatement( sql ); return stmt; } public PreparedStatement prepareStatement(Connection con,Collection<NoKey> keys,String sql,DbArcana dbArcana) throws SQLException { return prepareStatement(con,NoKey.INSTANCE,sql,0); } public NoKey refreshKeyAfterInsert(Connection con,DbRecord<NoKey,? extends DbObject> record) throws SQLException { return NoKey.INSTANCE; } public NoKey getKey(ResultSet rs) throws SQLException { return NoKey.INSTANCE; } public NoKey getKey(ResultSet rs,String tableName) throws SQLException { return NoKey.INSTANCE; } }