java.sql
Interface Connection
All Superinterfaces:
Wrapper
----------------------------------------------------------------------
public interface Connection extends Wrapper
A connection (session) with a specific database. SQL statements are executed and results are returned within the context of a connection.
A Connection object's database is able to provide information describing its tables, its supported SQL grammar, its stored procedures, the capabilities of this connection, and so on. This information is obtained with the getMetaData method.
Note: When configuring a Connection, JDBC applications should use the appropritate Connection method such as setAutoCommit or setTransactionIsolation. Applications should not invoke SQL commands directly to change the connection's configuration when there is a JDBC method available. By default a Connection object is in auto-commit mode, which means that it automatically commits changes after executing each statement. If auto-commit mode has been disabled, the method commit must be called explicitly in order to commit changes; otherwise, database changes will not be saved.
A new Connection object created using the JDBC 2.1 core API has an initially empty type map associated with it. A user may enter a custom mapping for a UDT in this type map. When a UDT is retrieved from a data source with the method ResultSet.getObject, the getObject method will check the connection's type map to see if there is an entry for that UDT. If so, the getObject method will map the UDT to the class indicated. If there is no entry, the UDT will be mapped using the standard mapping.
A user may create a new type map, which is a java.util.Map object, make an entry in it, and pass it to the java.sql methods that can perform custom mapping. In this case, the method will use the given type map instead of the one associated with the connection.
For example, the following code fragment specifies that the SQL type ATHLETES will be mapped to the class Athletes in the Java programming language. The code fragment retrieves the type map for the Connection object con, inserts the entry into it, and then sets the type map with the new entry as the connection's type map.
java.util.Map map = con.getTypeMap();
map.put("mySchemaName.ATHLETES", Class.forName("Athletes"));
con.setTypeMap(map);
分享到:
相关推荐
D-Bus是一种高效低耗的进程间...Qt中QDBus的Interface-Connection通讯方式方式相比于Adaptor-Interface方式较为简单,这种方式不需要XML文件,也不需要自动生成的adaptor类和Interface类,给用户提供更简便的使用方式。
connection.claimInterface(interface, true); // 打开端点 UsbEndpoint endpointOut = interface.getEndpoint(0); // 假设传出端点ID为0 UsbEndpoint endpointIn = interface.getEndpoint(1); // 假设接收端点ID为...
public interface Connection extends Wrapper { Statement createStatement() throws SQLException; void close() throws SQLException; } ``` 2. **真实主题实现**:实现`Connection`接口,提供具体的数据库...
public interface Connection { void close(); PreparedStatement prepareStatement(String sql) throws SQLException; } ``` 2. **创建实现类**:接下来创建一个实现`Connection`接口的具体类,该类负责与...
printf("Failed to query interface connection: %u\n", dwResult); } } WlanFreeMemory(pInterfaceList); } WlanCloseHandle(hClient, NULL); return 0; } ``` 这段代码首先打开一个到WLAN服务的句柄,...
interface Connection { void dial(String pno); void hangup(); } ``` 通过这样的设计,我们可以清晰地区分不同的功能模块,从而更好地应对需求变化,减少代码修改带来的风险。 ##### SRP的优点 - **减少耦合*...
- **定义**:`public interface ConnectionPool` - **方法**: - `getConnection()`: 获取连接。 - `releaseConnection(Connection conn)`: 归还连接。 - `closeAll()`: 关闭连接池。 #### 五、总结 数据库...
interface Connection{ public void dial(string pno); public void hangup(); } 二、开放封闭原则(OCP) 开放封闭原则是指软件实体应当对扩展开放,对修改关闭。这个原则的主要目的是为了使系统更加灵活和可...
USB4 Time Synchronization, Host Interface,Connection Manager and Thunderbolt 3 Compatibility USB开发者技术日的PPT,介绍了USB4的许多新的关键特性。
### Interface Connection (FP and SP) FP和SP分别代表前端和后端接口连接。在设计MT5931应用时,必须考虑如何正确连接这些接口,以确保数据流的顺畅和设备功能的正常运行。这可能涉及硬件布局、信号完整性分析以及...
4. **接口连接(Interface Connection)** 这部分会描述与显示器连接的接口类型,如LVDS、MIPI DSI或其他标准接口,并说明连接器的引脚定义。 5. **接口时序图(Interface Timing Chart)** 提供了接口信号的时序图表...
- 5.0 Interface Connection(接口连接):描述了与控制器或主板的接口类型和连接方式。 - 6.0 Signal Timing Specifications(信号时序规格):定义了信号的时序要求。 - 7.0 Signal Timing Waveforms of ...
接口连接(Interface Connection):描述屏幕的物理接口类型、针脚排列、信号类型等。 f. 信号时序规范(Signal Timing Specification):定义屏幕在不同模式下的时序参数,包括同步信号、时钟频率等。 g. 电源...
12. **接口连接**:接口的连接方式(interface connection)使得设计和验证的接口可以灵活地组合和扩展。 总之,IEEE 1800-2017标准的SystemVerilog是现代集成电路设计和验证不可或缺的工具,它不仅提供了强大的...
2. **接口连接 (Interface Connection)** - 描述了显示面板与其他电子设备之间信号传输的物理接口,包括引脚定义、电压电平标准等。 3. **MIPI 信号定时规格 (MIPI Signal Timing Specifications)** - MIPI ...
3. 电气特性(Electrical Characteristics)、接口连接(Interface Connection)、信号定时规格(Signal Timing Specification)、LVDS信号规格(LVDS Signal Specification)和颜色数据参考(Color Data Reference...
- MEMS Sensor interface connection项的更新关注到了MEMS传感器的中断引脚设计。 - MT6771 Camera Capabilities的更新可能包括了接口和吞吐量的修改,例如4路接口以及每路2.8Gbps的带宽。 - 这些更新暗示了MT...
4.接口连接(Interface Connection);5.LVDS信号规范(LVDSSignalSpecification);6.电源开启/关闭序列(Power ON/OFF Sequence);7.光学规格(Optical Specifications);8.机械图(Mechanical DRAWING);9....
public interface Connection { void run ( String statement , Map< String> parameters , Handler handler ); void discard ( long n , Handler handler ); void discardAll ( Handler handler ); void pull ...