本篇教程会向您展示如何使用DataStudio更加快速有效的自动创建可靠的数据库连接类。
This tutorial shows you how to use data Studio to develop applications more efficiently by automatically creating reliable database connection classes.
他介绍了如何使用JDBC驱动、连接、语句、结果集对象的类包装来工具化jdbc,并由此工具化数据库调用。
He describes how to use class wrapping of the JDBC driver, connection, statement, and result set objects to instrument JDBC, and hence, database calls.
例如,一个数据库可能已经有了连接到数据库并处理sql语句的包装器类。
For instance, a database may already have wrapper classes that connect to the database and process SQL statements.
需要DB 2驱动程序类来配置与DB 2数据库的连接。
The DB2 driver classes are required to configure a connection with the DB2 database.
载入JDBC驱动程序的标准过程需要两项:驱动程序的类名和连接的目标数据库的JDBCURL。
The standard processing for loading a JDBC driver requires two items: the driver's class name and the JDBC URL of the database that's targeted for connection.
既然已经声明两个类,只要告诉JPA运行时如何连接数据库。
Now that you have declared your two classes, you just need to tell the JPA runtime how to connect to your database.
构造函数将按照前面的描述创建一个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.
每个表类需要将对数据库连接的引用存储在它的_ connection成员中。
Each of your table classes needs to store a reference to a database connection in its _connection member.
cargo还可能是数据库连接、复杂的类实例或带有几个项的列表。
Cargo might also be a database connection, a complex class instance, or a list with several items in it.
这意味着应用程序使用JDBCDriverManager类来建立数据库连接。
This means that the application USES the JDBC DriverManager class to establish the database connection.
接下来,修改owneraction类中的execute方法,使其连接到数据库上(参见清单8)。
Next, modify the execute method in the OwnerAction class to connect to the database (refer to Listing 8).
上述代码充当的是到CouchDB的连接代码并且包含使用此数据库所需的所有相关类。
This code serves as your connection code to CouchDB and includes all the relevant classes that you'll need to work with the database.
在清单4的第一行中,我创建了Groovy的Sql类的实例,用它来连接指定的数据库。
In the first line of Listing 4, I created an instance of Groovy's Sql class, which is used to connect to a desired database.
对setup的专门调用将连接到数据库,为每个表设置一个类,然后让那些类去继承Maypole:Model:CDBI。
That single call to setup will connect to the database, set up a single class for each table, and cause those classes to inherit from Maypole: : Model: : CDBI.
如果您使用一个真正的应用程序服务器(ApplicationServer),那么该应用程序服务器将使用这些类来连接到数据库的本地xa调用。
If you use a real Application Server these classes are used by the Application Server to interface for the native XA calls to the databases.
还指定了JDBC驱动程序类、数据库用户名和连接数据库(在这个数据库中已经创建了users 和usergroup表)所用的 JDBCURL。
I have provided values for the JDBC driver class, the database user name, and a JDBC URL to connect to the database, in which you have already created the users and usergroup tables.
另一类瞬时脉冲来自于失去与数据库或者其他后台系统的连接。
Lost connectivity to the database or another back-end system is another kind of transient impulse.
例如,假设类中的每个测试都使用一个数据库连接、一个网络连接、一个非常大的数据结构,或者还有一些对于初始化和事情安排来说比较昂贵的其他资源。
For instance, suppose each test in the class USES a database connection, a network connection, a very large data structure, or some other resource that's expensive to initialize or dispose of.
比如数据库连接池就是单例设计模式的一个例子:我们一般不想让应用程序具有连接池类的多个资源密集型实例。
An example use case for a singleton would be a database connection pool: you don't want your application to have multiple resource-intensive instances of a connection pool class.
例如,如果连接的是Oracle数据库,那么名为NVL的实用程序类函数返回nvl;如果连接的是DB2,那么返回COALESCE。
For example, a utility class function called NVL would return NVL if the database connection is with Oracle, and COALESCE if the DB connection is with DB2.
决定实现一个实用程序类来进行数据访问的关键原因是,希望确保可以使用相同的类来连接任何类型的Domino数据库。
The key reason why we decided to have a utility class for data access was to ensure that the same classes could be used to connect to any type of Domino database.
在这个示例中,我们有一个数据库管理器的类,该类保持了所有到数据库的活动连接,并且提供了一个枚举所有这些连接的方法。
In this example, we have a database manager class that keeps track of all active connections to the database and provides a method for enumerating those connections.
提供OCI连接数据库并进行相关操作的通用的类,方便。
Provide oci connect to the database and associated operation of a common, easy.
这一方法是把类的整体与部分关系、一般与特殊关系和实例连接应用到数据库设计中。
The way will be the whole-part of kind, general-particular and example joining to apply in databases design.
通过使用单个类,您将使测试人员更加方便地更改数据库提供程序和连接字符串。
By using a single class, you make it easier for testers to change database providers and connection strings.
地理数据库的规则具体可分为属性域规则、关系规则和连接规则三大类。
The rules of geodatabase can be classified into attribute field rules, relation rules, and connection rules.
大量新的插件有:一个自动处理框架、动态过滤,新的且有效的聚类方法,一个机器学习模块和数据库连接。
Among the large number of new plugins are an automated processing framework, dynamic filtering, new and efficient clustering methods, a machine learning module and database connectivity.
共享资源包括内存中的数据比如实例或类变量和外部对象比如文件、数据库连接以及网络连接。
Shared resources include in-memory data such as instance or class variables and external objects such as files, database connections, and network connections.
共享资源包括内存中的数据比如实例或类变量和外部对象比如文件、数据库连接以及网络连接。
Shared resources include in-memory data such as instance or class variables and external objects such as files, database connections, and network connections.
应用推荐