このページはEtoJ逐語翻訳フィルタによって翻訳生成されました。

翻訳前ページへ


The 創造 and retrieving of 自動車 increment values
Language

The 解放する/自由な and Open 生産性 控訴
解放(する)d: Apache OpenOffice 4.1.15

The 創造 and retrieving of 自動車 increment values



見解/翻訳/版 History

What/When

Who

草案---July 18, 2002

Ocke Janssen

GUI string review---July 25, 2002

Elizabeth Matthis

GUI change---July 26, 2002

Ocke Janssen

Final--- July 26, 2002fill in date

Ocke Janssen



Problem description

At the moment it is not possible to create 自動車 increment columns and to retrieve the value of an 自動車 increment column when a new 列/漕ぐ/騒動 was 挿入するd.

創造 of 自動車 increment columns

予定 to the fact that there 存在するs no 基準 way on defining 自動車 increment columns when creating a new (米)棚上げする/(英)提議する, a general approach is not possible. For example: MySQL identifies an 自動車 increment 鮮明度/定義 of a column with the 重要な word “auto_increment”, the MS SQL Server on the other 味方する uses the keyword “increment(1,1)” to identify the 自動車 increment column.

Retrieving of 自動車 increment column's values

The retrieving of an 自動車 increment column's value, when 挿入するing a new 列/漕ぐ/騒動, is already defined in the JDBC API 3.0. There the 声明 supports an 付加 method which returns a result 始める,決める to 接近 the new 挿入するd 自動車 increment column's value. This result 始める,決める also supports meta data. To check if the 声明 supports this 機械装置, the database meta data is 延長するd by new support method which 簡単に returns true or 誤った.

解答

To 許す a general approach of defining/retrieving 自動車 increment columns/values, the 使用者 must have the 可能性 to define a 声明 which should be appended at the column 鮮明度/定義 when creating a (米)棚上げする/(英)提議する or should be called when fetching the new value of the 自動車 increment column.

創造 of 自動車 increment columns

When creating (米)棚上げする/(英)提議するs for any 肉親,親類d of database, the 現在の 扱うing at the moment is that we use a general SDBCX 層 for all database drivers which do not support the 層 by their self. In other words the 使用者 has to take no 活動/戦闘 when the database driver supports already the SDBCX 層. For the 事例/患者 that the driver doesn't support the SDBCX 層 and the 使用者 creates a new (米)棚上げする/(英)提議する, the 生成するd SQL 声明 may look like this:

CREATE TABLE “table1” (“id” INTEGER)

The “CREATE TABLE” 声明 doesn't support any 自動車 increment features, so that it isn't possible to create such columns. For MySQL this 声明 for an 自動車 increment column looks like this:

CREATE TABLE “table1” (“id” INTEGER AUTO_INCREMENT)

Like this examples shows the 使用者 must have the 適切な時期 to 追加する the 行方不明の part of the 声明 to the “CREATE TABLE” 声明. This can be done in two different ways which mustn't 除外する each other.

  1. The data source 蓄える/店s in their info 所有物/資産/財産 an 付加 string which should be appended to the column part when creating an 自動車 increment column. To 許す the 使用者 to 挿入する this string the data source 行政 dialog could be 延長するd by a simple text field and may be an 付加 checkbox which enables this text field.

  2. The (米)棚上げする/(英)提議する design 申し込む/申し出s an 付加 field on the column 所有物/資産/財産s area when an 自動車 increment type was selected. This field can be used by the 使用者 to define a string which should be appended to the “CREATE TABLE” 声明.

  3. The points 1. and 2. are both used and under point 2, the string which the 使用者 挿入するd under point 1 will be 陳列する,発揮するd in the extra field.

The 3rd approach would be the one which 許すs the 使用者 the most 柔軟性 to get a predefined string which he could change if necessary. The best place to 蓄える/店 the value for the data source would be the data source 行政 dialog. To be more 正確な this would be 器具/実施するd for the JDBC and the ODBC drivers (they don't support the SDBCX 層). All other drivers support the SDBCX 層.

Retrieving of 自動車 increment column's values

As について言及するd in the problem description JDBC 3.0 already defines methods to 遂行する the 仕事 but it is not possible just to 今後 this to the used drivers. Many drivers as also APIs like ODBC don't support this feature. To fit 近づく all databases, a method has to be 器具/実施するd that 許すs to fetch the new 挿入するd 自動車 increment value. Many databases support a special SQL 声明 which 許すs to fetch this value. Mostly these 声明s are database 明確な/細部 and not SQL 適合する. So a 類似の approach as for the 創造 of 自動車 increment columns should be chosen. The data source should also 蓄える/店 a SQL string which 許すs to fetch the 自動車 increment values. This string will then be 遂行する/発効させるd by the 声明 when asked for the 自動車 increment values after 挿入するing a new 列/漕ぐ/騒動. To be 両立できる as possible to any 肉親,親類d of database the SQL string, 蓄える/店d in the data source, must 実行する some 付加 specifications to be valid for different (米)棚上げする/(英)提議するs. In other words, the SQL string must 含む/封じ込める some keywords like $column1 or $table1 which will be 取って代わるd with the 自動車 increment column 指名する or with the used (米)棚上げする/(英)提議する. A general string could already be 挿入するd into the data source dialog which is not the best 解答 but 作品 for a lot of drivers:

“select count($column1)+1 from $table1”

If the supporting of this feature should be 無能にするd the string could be (疑いを)晴らすd by the 使用者 or an 付加 checkbox must be 挿入するd into to the dialog to enable or 無能にする this feature. When this feature is enabled the database meta data 反対する 器具/実施するd by the driver will return 誤った when asking the general support method for the feature “AutoRetrievingEnabled” さもなければ true. When true was returned the 声明 反対する 器具/実施するd by the driver 許すs the 創造 of a result 始める,決める to fetch the 自動車 increment values.

Data source 行政 dialog






English

German

Comment

~Retrieve 生成するd values

Generierte Werte ~berücksichtigen

Checkbox to enable this feature

~自動車-increment 声明

~自動車-Increment-Ausdruck

FixedText which 含む/封じ込めるs the 声明 which should be appended after each column 鮮明度/定義

~Query of 生成するd values

Abfrage der generierten ~Werte

FixedText which 含む/封じ込めるs the 声明 which will be called after an “INSERT” 声明



(米)棚上げする/(英)提議する design




English

German

Comment

自動車-increment 声明

~自動車-Increment-Ausdruck

FixedText which 含む/封じ込めるs the same value as the 2nd FixedText in data source 行政 dialog

Enter an SQL 声明 for the 自動車-increment field.\n\nThis 声明 will be 直接/まっすぐに transferred to the database when the (米)棚上げする/(英)提議する is created.

Geben Sie hier einen SQL Ausdruck für das 自動車-Increment-Feld an.\n\nDieser Ausdruck wird beim Erzeugen der Tabelle direkt an die Datenbank übertragen.

HelpText for this field which appears in the left 味方する 支配(する)/統制する



The ASF

Copyright & License | Privacy | 接触する Us | 寄付する | Thanks

Apache, OpenOffice, OpenOffice.org and the seagull logo are 登録(する)d trademarks of The Apache ソフトウェア 創立/基礎. The ASF logo is a trademark of The Apache ソフトウェア 創立/基礎. Other 指名するs appearing on the 場所/位置 may be trademarks of their 各々の owners.