query

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: 2 Imported by: 0

Documentation

Overview

クエリー機能を提供するパッケージ。

Index

Constants

View Source
const (
	ORDERBY_ASC = iota
	ORDERBY_DESC
)

Variables

This section is empty.

Functions

func CreateJobQuery

func CreateJobQuery(conn db.IConnection) *jobQuery

func GetJobMapOfTargetNetwork

func GetJobMapOfTargetNetwork(conn db.IConnection, nid int) (map[string]*db.JobResult, error)

 ジョブネットワークのインスタンスIDを指定して、ジョブ情報をマップ形式で取得する。

func GetJobnetwork

func GetJobnetwork(conn db.IConnection, id int) (*db.JobNetworkResult, error)

 ジョブネットワークのインスタンスIDを指定して、ジョブネットワーク詳細情報を取得する。

func GetJobnetworkListFromName

func GetJobnetworkListFromName(conn db.IConnection, name string, orderby int) ([]*db.JobNetworkResult, error)

ジョブネットワーク名を指定して、一覧を取得する。

param - conn 接続済みのDBコネクション。

param - name 検索に使用するジョブネットワーク名。

param - orderby 昇順(query.ORDERBY_ASC) / 降順(query.ORDERBY_DESC)

return ジョブネットワークレコードのスライスとエラー情報

func GetJobsOfTargetNetwork

func GetJobsOfTargetNetwork(conn db.IConnection, nid int, orderby int) ([]*db.JobResult, error)

 ジョブネットワークのインスタンスIDを指定して、ジョブ情報を取得する。

param - conn 接続済みのDBコネクション。

param - nid 検索に使用するジョブネットワークのインスタンスID。

param - orderby 昇順(query.ORDERBY_ASC) / 降順(query.ORDERBY_DESC)

return ジョブネットワークレコードのスライスとエラー情報

func JobCountAll

func JobCountAll(conn db.IConnection) int

JOBテーブルの総件数を取得する。

func JobnetworkCountAll

func JobnetworkCountAll(conn db.IConnection) int

JOBNETWORKテーブルの総件数を取得する。

Types

type JobNetResultQuery

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

func CreateJobnetworkQuery

func CreateJobnetworkQuery(conn db.IConnection) *JobNetResultQuery

func (*JobNetResultQuery) AddAndWhereID

func (j *JobNetResultQuery) AddAndWhereID(id int)

引数に指定したIDと合致する条件を追加。

func (*JobNetResultQuery) AddAndWhereJobnetwork

func (j *JobNetResultQuery) AddAndWhereJobnetwork(jobnetwork string)

引数に指定したJOBNETWORKと合致する条件を追加。

func (*JobNetResultQuery) AddAndWhereLessThanStartdate

func (j *JobNetResultQuery) AddAndWhereLessThanStartdate(startDate string)

引数に指定したSTARTDATEよりも小さい日付[ STARTDATE < '引数' ]を取得。

func (*JobNetResultQuery) AddAndWhereMoreThanStartdate

func (j *JobNetResultQuery) AddAndWhereMoreThanStartdate(startDate string)

引数に指定したSTARTDATEよりも大きい日付[ '引数' < STARTDATE ]を取得。

func (*JobNetResultQuery) AddAndWhereStatus

func (j *JobNetResultQuery) AddAndWhereStatus(status int)

引数に指定したSTATUSと合致する条件を追加。

func (*JobNetResultQuery) AddOrderBy

func (j *JobNetResultQuery) AddOrderBy(orderby int)

ORDER BY句を追加する。 引数へは ORDERBY_ASC または ORDERBY_DESC を指定する。

func (*JobNetResultQuery) GetJobnetworkList

func (j *JobNetResultQuery) GetJobnetworkList() ([]*db.JobNetworkResult, error)

ジョブネットワーク一覧を取得する。

Jump to

Keyboard shortcuts

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