Once the context object goes out of scope, which like a database connection should be very quickly, the data objects essentially become read-only.
就像数据库连接那样应该非常快,一旦该上下文对象超出范围,数据对象实质上就进入只读状态。
A trusted context is an object that gives users a specific set of privileges and is available when the user connects to the database through a trusted connection.
受信任上下文是一个对象,它为用户提供一组特定的特权,当用户通过一个受信任的连接连接到数据库时,便可以使用它。
When a database connection is established, DB2 compares the attributes of that connection against the definitions of each trusted context object in the database.
当建立一个数据库连接时,DB 2将那个连接的属性与数据库中每个可信上下文对象的定义相比较。
In this case, we would mock the query method of the database connection object so that we could just return back the results instead of calling out to the database for them.
在这里,我们可以模拟数据库连接对象的查询方法,这样我们就只需要返回结果,而不需要真正地去查询数据库。
A trusted context is a database object defining the set of properties for a connection.
可信任上下文是一个数据库对象,定义了连接的属性。
At connect time, the DB2 server checks to see if the connection matches the definition of a trusted context object in the database.
在连接时,DB 2检查连接是否与数据库中可信上下文对象相匹配。
The onpload database can be found in Object Explorer, under the listing of databases available in the connection created to IDS.
onpload数据库可以在ObjectExplorer中找到,位于为ids创建的连接中可用的数据库清单下。
Next, you need to get a JDBC connection -- this is done via the connect() method of the Database object.
接下来,需要获得一个JDBC连接 --这是通过Database 对象的connect()方法来实现的。
Now you can pass in an object directly that is compatible with the expected database connection object, and it will use that object instead of creating a new one.
现在您可以直接传入一个对象,它与预期数据库连接对象相兼容,然后直接使用这个对象,而非创建一个新对象。
The constructor creates a DBManager object to establish a database connection, as discussed earlier, and then acquires an instance of the ProductDAO class.
构造函数将按照前面的描述创建一个DBManager对象以建立数据库连接,然后获得productdao类的实例。
The constructor creates a DBManager object to establish a database connection, as discussed earlier, and then acquires an instance of the ProductDAO class.
构造函数将按照前面的描述创建一个DBManager对象以建立数据库连接,然后获得productdao类的实例。
应用推荐