JDBC Driver for JSON

Build 22.0.8479

接続プロパティ

利用可能な接続プロパティは、Driver クラスのgetPropertyInfo メソッドを使って取得できます。このメソッドは、DriverPropertyInfo タイプのエレメントを持つ配列を返します。

String connectionString = "jdbc:DataModel=Relational;URI=C:\people.json:";

Driver driver = DriverManager.getDriver(connectionString);
Properties info = new Properties();
DriverPropertyInfo[] attr = driver.getPropertyInfo(connectionString,info);
for(int i=0;i<attr.length;i++){
  System.out.println(attr[i].name);
  System.out.println(attr[i].description);
  System.out.println(attr[i].required);
  System.out.println(attr[i].value);
  String[] c = attr[i].choices;
  if(c != null) {
    for(String s: c)
      System.out.println(s);
  }
}

DriverPropertyInfo クラスには以下のプロパティがあります。

プロパティ名データ型説明
NameString接続プロパティ名。
DescriptionString接続プロパティの説明。
RequiredbooleanJSON への接続に接続プロパティの設定が必要かどうか。
ChoicesString[]接続プロパティに許可された値の配列。
ValueString現在の接続プロパティの値、またはデフォルト値(ユーザーにより設定されていない場合)。

Copyright (c) 2023 CData Software, Inc. - All rights reserved.
Build 22.0.8479