db

package
v0.9.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 4, 2015 License: GPL-2.0 Imports: 6 Imported by: 7

Documentation

Overview

DB周りの定義や処理を記述するパッケージ。

Index

Constants

View Source
const (
	RUNNING = iota
	NORMAL
	WARN
	ABNORMAL = 9
)

実行結果のステータス

View Source
const (
	ST_RUNNING  = "RUNNING"
	ST_NORMAL   = "NORMAL END"
	ST_WARN     = "WARN END"
	ST_ABNORMAL = "ABNORMAL END"
)

実行結果の文字列ステータス

Variables

This section is empty.

Functions

This section is empty.

Types

type Connection

type Connection struct {
	// contains filtered or unexported fields
}

func (Connection) Close

func (c Connection) Close()

SQLite3とのセッションを切断する。

func (Connection) GetDb

func (c Connection) GetDb() *sql.DB

DBオブジェクトを返す。

func (Connection) GetDbMap

func (c Connection) GetDbMap() *gorp.DbMap

DBマッピング情報を返す。

type IConnection

type IConnection interface {
	GetDbMap() *gorp.DbMap
	GetDb() *sql.DB
	Close()
}

func Open

func Open(dbfile string) (IConnection, error)

SQLite3のセッションを接続し、テーブルとDTOのマッピングを行う。

param - dbfile sqliteファイルのパス。

return - コネクション情報とエラー情報

type JobNetworkResult

type JobNetworkResult struct {
	ID         int    // ジョブネットワークのインシデントID
	JobnetWork string // ジョブネットワーク名
	StartDate  string // 起動日時
	EndDate    string // 終了日時
	Status     int    // ジョブネットワークのステータス
	Detail     string // 詳細メッセージ
	PID        int    // masterのPID
	CreateDate string // 作成日時
	UpdateDate string // 更新日時
}

ジョブネットワーク実行結果

func NewJobNetworkResult

func NewJobNetworkResult(jobnetName string, startDate string, status int) *JobNetworkResult

ジョブネットワーク実行結果のコンストラクタ。

param : jobnetName ジョブネットワーク名。

param : startDate ジョブネットワーク起動日時。

param : status ステータス。

return : JobNetworkResultポインタ

type JobResult

type JobResult struct {
	ID         int    // ジョブネットワークのインシデントID
	JobId      string // ジョブID
	JobName    string // ジョブ名
	StartDate  string // ジョブの起動日時
	EndDate    string // ジョブの終了日時
	Status     int    // ステータス
	Detail     string // 詳細メッセージ
	Rc         int    // リターンコード
	Node       string // ノード名
	Port       int    // ポート番号
	Variable   string // 変数情報
	CreateDate string // 作成日時
	UpdateDate string // 更新日時
}

ジョブ実行結果

func NewJobResult

func NewJobResult(id int) *JobResult

ジョブ実行結果のコンストラクタ。

param : id ジョブネットワークのインシデントID

return : JobResultポインタ

Directories

Path Synopsis
クエリー機能を提供するパッケージ。
クエリー機能を提供するパッケージ。
トランザクション機能を提供するパッケージ。
トランザクション機能を提供するパッケージ。

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL