CData Virtuality Server はGit integrationをサポートしており、CData Virtuality オブジェクトの変更を記録する便利な方法をお望みであれば、バージョン管理システムとして Git を設定して使用することができます。
現在サポートされているオブジェクトのリスト:
Data sources
Views
Procedures
Remarks
Roles
Permissions
Users
Jobs
INTERVAL
、CRON
、およびCHAINED
タイプのスケジュールDefault options
Data catalog attributes
Publications
Optimizations
Recommended indexes
Recommended optimization symbols
Materialized tables
Queue handlers
SYSADMIN.gitInit
このプロシージャは、サーバーオブジェクトをコンテンツとするローカルの Git リポジトリを開始します。
CALL
"SYSADMIN.gitInit"
(
"repoFolder"
=>
'/some/file/path'
);;
以下のパラメータがあります:
To view the full table, click the expand button in its top right corner
Parameter | In/Out | Type | Nullable? | Description |
---|---|---|---|---|
| In | string | No | System path where the repository will be initialized |
| Out | string | No | Result of the operation |
When importing a large amount of jobs and schedules it is recommended to initiate Git repository after the import to make schedules.sql file creation faster.
SYSADMIN.gitCheckout
このプロシージャは、Git が作業しているブランチやタグを切り替え、その結果を通知します。
-- With branch
CALL
"SYSADMIN.gitCheckout"
(
"branch"
=>
'branchName'
);;
-- With tag
CALL
"SYSADMIN.gitCheckout"
(
"tag"
=>
'1.0.0'
);;
以下のパラメータがあります:
To view the full table, click the expand button in its top right corner
Parameter | In/Out | Type | Nullable? | Description |
---|---|---|---|---|
| In | string | Yes | Branch name Git will use. If omitted, the procedure will return the current branch |
| In | string | Yes | The tag name to checkout. It is mutually exclusive with a branch parameter. When doing a checkout of a tag, it is recommended to avoid creating new objects in the server |
| Out | string | No | Result of the operation if |
SYSADMIN.gitClone
このプロシージャは、指定したパラメータで「git clone」を実行します。
CALL
"SYSADMIN.gitClone"
(
"remoteUrl"
=>
'git @ remote-url.com:user/repo.git'
,
"repoFolder"
=>
'/some/file/path'
,
"sshKeyId"
=>
1
,
"branchToCheckout"
=>
'branchName'
);;
以下のパラメータがあります:
To view the full table, click the expand button in its top right corner
Parameter | In/Out | Type | Nullable? | Description |
---|---|---|---|---|
| In | string | No | URL of the remote repository in the SSH format (usually git @ remote- url.com:user/repo.git) |
| In | string | No | System path the repo should be cloned into |
| In | integer | No | SSH key ID to be used as authentication in the remote repository. See documentation for the |
| In | string | Yes | Branch to be checked out. If omitted, the master branch will be used |
| Out | string | No | Result of the operation |
SYSADMIN.gitExclude
このプロシージャは、Git Integration の操作中に除外するオブジェクトやオブジェクト名のパターンをカンマ区切りで指定します。
replaceInsteadOfAppend
がFALSE
(デフォルト)に設定されている場合、プロシージャはobjectOrPattern
の値のパターンまたはオブジェクト名を既存の除外リストに追加し、そうでない場合は置き換えます。
CALL
"SYSADMIN.gitExclude"
(
"objectOrPattern"
=>
'view:views.v1, procedure:views.proc_%'
,
"replaceInsteadOfAppend"
=>
true
);;
以下のパラメータがあります:
Parameter | In/Out | Type | Nullable? | Description |
---|---|---|---|---|
| In | string | No | The object name(s) or pattern(s) (SQL LIKE) to be excluded during Git integration operations. Should be provided as a comma-separated list of values in the following format: |
| In | string | Yes | Changes the behaviour from appending new patterns to replacing the current exclude list with the |
| Out | string | No | Result of the operation |
使用可能なオブジェクトのパターンのリスト:
DataSource
Schema
View
Procedure
Remark
Role
User
Permission
Job
Default Option
Schedule
Data Catalog Attribute
Queue Handler
Optimization
Recommended Index
Web Business Data Shop(
SYSADMIN.WebBusinessDataShopPublished
テーブルにある公開オブジェクトの名前)
Support for roles, users, permissions, jobs (SQLJob
, CopyOverSQLJob
, createCopyOverSourceTableJob
), schedules, remarks, data catalog attributes, and publications is available since v4.0.5
Support for optimizations, recommended indexes, recommended optimization symbols, queue handlers, jobs (full support), and schedules (full support) is available since v4.1
SYSADMIN.purgeObjects
このプロシージャは、指定されたオブジェクトタイプのリストに応じて、サーバーからオブジェクトをパージします。
CALL
"SYSADMIN.purgeObjects"
(
"objectTypes"
=>
'views,procedures'
,
"dryRun"
=>
false
,
"ignorePurgeInGit"
=>
true
,
"bypassGitExclude"
=>
true
);;
以下のパラメータがあります:
Parameter | In/Out | Type | Nullable? | Description |
---|---|---|---|---|
| In | string | Yes | Filter objects to be purge by type in CSV format. Default: Supported values: (*) The |
| In | boolean | Yes |
Default: |
| In | boolean | Yes | If set to Default: |
| In | boolean | Yes | If set to Default: |
| Out | string | No | Result of the operation |
The ignorePurgeInGit
and bypassGitExclude
parameters in the SYSADMIN.purgeObjects
procedure available since v4.2
The 'all jobs' object type in the SYSADMIN.purgeObjects
procedure available since v4.10
SYSADMIN.gitCommit
このプロシージャは、ローカルリポジトリにファイルをコミットします。
CALL
"SYSADMIN.gitCommit"
(
"message"
=>
'Commit message'
,
"files"
=> Array(
'virtual_schema/views/create.sql'
)
);;
以下のパラメータがあります:
To view the full table, click the expand button in its top right corner
Parameter | In/Out | Type | Nullable? | Description |
---|---|---|---|---|
| In | string | No | Message to be used in the commit operation |
| In | string | Yes | Array-formatted list of files to be committed. If omitted, the entire repository is committed |
| Out | string | No | Result of the commit operation containing the commit hash ID |
SYSADMIN.gitStatus
このプロシージャは、ファイルのリストとGit ステータスを返します。
CALL
"SYSADMIN.gitStatus"
();;
以下のパラメータがあります:
To view the full table, click the expand button in its top right corner
Parameter | In/Out | Type | Nullable? | Description |
---|---|---|---|---|
| ResultsSet | string | No | Status of the given file. Options are |
| ResultsSet | string | No | Relative path of the file |
SYSADMIN.gitDiff
このプロシージャは、指定したファイルのGit diff を表示します。
CALL
"SYSADMIN.gitDiff"
(
"file"
=>
'virtual_schema/views/create.sql'
);;
以下のパラメータがあります:
To view the full table, click the expand button in its top right corner
Parameter | In/Out | Type | Nullable? | Description |
---|---|---|---|---|
| In | string | No | Individual file to check the differences for |
| Out | string | No | Output of git diff for the requested file |
SYSADMIN.gitFixConflict
このプロシージャは、git checkout --ours/theirs path-to-file を使ってGit の衝突を修正するもので、ローカル版かリモート版のどちらかを選んで衝突を修正します。
CALL
"SYSADMIN.gitFixConflict"
(
"file"
=>
'virtual_schema/views/create.sql'
,
"strategy"
=>
'OURS'
);;
以下のパラメータがあります:
To view the full table, click the expand button in its top right corner
Parameter | In/Out | Type | Nullable? | Description |
---|---|---|---|---|
| In | string | No | File to check |
| In | string | No | Strategy to fix the conflict. Accepted values are |
| Out | string | No | Result of the operation |
SYSADMIN.gitPull
このプロシージャは、リモートの Git リポジトリに対してgit pull origin
を実行し、部分的に成功した場合は有益な例外をスローします。
CALL
"SYSADMIN.gitPull"
();;
以下のパラメータがあります:
To view the full table, click the expand button in its top right corner
Parameter | In/Out | Type | Nullable? | Description |
---|---|---|---|---|
| Out | string | No | Result of the operation |
SYSADMIN.gitPush
このプロシージャは、リモートのGit リポジトリに対してgit push origin CURRENT_BRANCH
を実行し、部分的に成功した場合は有益な例外をスローします。
CALL
"SYSADMIN.gitPush"
(
"additionalProperties"
=>
'atomic=false'
);;"
以下のパラメータがあります:
To view the full table, click the expand button in its top right corner
Parameter | In/Out | Type | Nullable? | Description |
---|---|---|---|---|
| Out | string | No | Result of the operation |
| In | string | Yes | Allows to disable/enable atomic flag in git push. Default value of atomic flag: |
The additionalProperties
parameter in the SYSADMIN.gitPush
procedure is available since v4.7
SYSADMIN.gitSetRemote
このプロシージャは、現在のGit リポジトリのリモートを追加します。リモートリポジトリで認証が成功したことを確認するためにサーバーと通信します。
CALL
"SYSADMIN.gitSetRemote"
(
"remoteUrl"
=>
'git @ remote-url.com:user/repo.git'
,
"sshKeyId"
=> 1
);;
以下のパラメータがあります:
To view the full table, click the expand button in its top right corner
Parameter | In/Out | Type | Nullable? | Description |
---|---|---|---|---|
| In | string | No | URL of the remote repository in the SSH format (usually git@remote- url.com:user/repo.git) |
| In | integer | No | SSH key ID to be used as authentication in the remote repository. See documentation for the |
| Out | string | No | Result of the operation |
SYSADMIN.gitDeploy
このプロシージャはローカルのGit リポジトリを読み込み、CData Virtuality Server のファイルに含まれるSQL 文を実行します。
CALL
"SYSADMIN.gitDeploy"
(
"dryRun"
=>
'true'
);;
以下のパラメータがあります:
To view the full table, click the expand button in its top right corner
Parameter | In/Out | Type | Nullable? | Description |
---|---|---|---|---|
| In | boolean | Yes | If set, no actual task is performed in the CData Virtuality Server. The procedure will iterate all files and try to parse the SQL statements, but will not execute them |
| Out | string | No | Result of the operation |
SYSADMIN.gitTag
このプロシージャは、リポジトリの最後のコミットを指すローカルタグを作成します。
CALL
"SYSADMIN.gitTag"
(
"name"
=>
'tag_name'
,
"message"
=>
'some message'
);;
以下のパラメータがあります:
To view the full table, click the expand button in its top right corner
Parameter | In/Out | Type | Nullable? | Description |
---|---|---|---|---|
| In | string | No | Name of the tag (like ‘1.0.0’) |
| In | string | No | Description of the tag and its details |
| Out | string | No | Result of the operation |