ページの先頭行へ戻る
Symfoware Server V12.1.x アプリケーション開発ガイド
FUJITSU Software

4.4.1 データ型

Symfoware Serverでは、様々なデータ型を使用することができます。

基本データ型に属するデータ型は、アプリケーションをVisual Studio上のツールを利用して自動生成する場合(TableAdapter内のクエリビルダーやサーバーエクスプローラー)、アプリケーションを自由に作成する場合(Data Provider)のどちらの場合においてもサポートします。

  

表4.1 サポートするデータ型一覧

データ型

サポート可否

Visual Studio連携画面操作

Fujitsu Npgsql .NET Data Provider本体

character

character varying

national character

national character varying

text

bytea

×

smallint

integer

bigint

△(注1)

smallserial

serial

bigserial

△(注1)

real

double precision

numeric

decimal

money

×

×

date

time with time zone

○(注2)

○(注2)(注3)

time without time zone

○(注2)

○(注2)

timestamp without time zone

timestamp with time zone

interval

△(注4)

boolean

bit

△(注5)

△(注5)

bit varying

×

×

uuid

△(注4)

inet

△(注4)(注6)

△(注6)

macaddr

×

cidr

×

×

幾何データ型(point,lseg,box,path,polygon,circle)

×

array

×

oid

×

×

xml

json

×

×

テキスト検索に関する型(tsvector,tsquery)

×

×

列挙型

×

×

複合型

×

×

範囲型

×

×

注1) 動的なパラメータとして使う場合、int32の範囲のデータ値しか代入できません

注2) 以下の例のとおり、time with time zoneおよびtime without time zoneの値を表示すると、日付データが補填された形で表示されます。しかし、実データは時刻のみのデータで構成されるため、表示以外に注意すべきことはありません。

例:

【表(t1)の構成】

col1(time with time zone)

col2(time without time zone)

10:21:30 +08:00

10:21:30

23:34:03 +08:00

23:34:03

17:23:54 +08:00

17:23:54

time with time zoneは“実行日”の日付データ、time without time zoneは“0001/01/01”の日付データが補填された形で表示されます。

SELECT * 
  FROM t1;
 col1                       |    col2            
----------------------------+---------------------
 2014/09/03 10:21:30 +08:00 | 0001/01/01 10:21:30 
 2014/09/03 23:34:03 +08:00 | 0001/01/01 23:34:03
 2014/09/03 17:23:54 +08:00 | 0001/01/01 17:23:54 

注3) このデータ型に対して更新する場合、以下のように値を設定してください。

c3をtime with time zoneのデータ型にした場合の例:

DataRow dr = ds.Tables[0].Rows[ds.Tables[0].Rows.Count - 1];
dr["c3"] = new DateTimeOffset(2000, 1, 1, 0, 0, 0, new TimeSpan(9, 0, 0));

注4) 動的なパラメータとして使う場合、DDEXで自動生成したDataGridViewにパラメータ値を代入できません

注5) 長さが2以上のみサポートします

注6) 単一のホストのみサポートします