C# 클래스 MonkeyWrench.DB

상속: IDisposable, IDB
파일 보기 프로젝트 열기: mono/monkeywrench 1 사용 예제들

공개 메소드들

메소드 설명
Audit ( MonkeyWrench who, string action ) : void
BeginTransaction ( ) : IDbTransaction
ClearAllWork ( int lane_id, int host_id ) : void
ClearWork ( int lane_id, int revision_id, int host_id ) : void
CloneLane ( int lane_id, string new_name, bool copy_files ) : DBLane
CreateCommand ( ) : IDbCommand

Creates a command with a default timeout of 300 seconds.

CreateCommand ( System.TimeSpan Timeout ) : IDbCommand

Creates a command with the specified timeout. A timeout of 0 means infinity.

CreateCommand ( string query ) : IDbCommand
CreateParameter ( IDbCommand cmd, string name, object value ) : void
DB ( ) : System
DB ( bool Connect ) : System
DeleteAllWork ( int lane_id, int host_id ) : void
DeleteFiles ( int host_id, int lane_id, int revision_id ) : void

Deletes all the files related to the work in the revision 'revision_id' of lane 'lane' on the host 'host'.

DeleteLinks ( int host_id, int lane_id, int revision_id ) : void
DeleteWork ( int lane_id, int revision_id, int host_id ) : void
Dispose ( ) : void
Download ( DBFile file ) : Stream
Download ( MonkeyWrench.DataClasses.DBWorkFile file ) : Stream
Download ( DBWorkFileView file ) : Stream
ExecuteNonQuery ( string sql ) : int
ExecuteScalar ( string sql ) : object
GetAllHostLanes ( ) : List
GetAllLaneFiles ( ) : List
GetAllLanes ( ) : List

Returns all the lanes in the database.

GetCommands ( int lane_id ) : List
GetDBRevisions ( int lane_id, bool ordered ) : DBRevision>.Dictionary
GetDBRevisions ( int lane_id, int limit, bool ordered = true ) : List
GetDBRevisions ( int lane_id, int limit, int offset, bool ordered = true ) : List
GetHostLane ( int host_id, int lane_id ) : DBHostLane
GetHosts ( ) : List
GetHostsForLane ( int lane_id ) : List
GetLane ( int id ) : DBLane

Returns lane that matches lane_id in the database

GetLaneHierarchy ( int lane_id ) : List

This will return a list of lane ids: [0]: input lane_id [1]: [0]'s parent lane id [2]: [1]'s parent lane id etc

GetLanes ( ) : List

Returns all the lanes for which there are revisions in the database

GetLanesForHost ( int host_id, bool only_enabled ) : List
GetLargeObjectSize ( int oid ) : int
GetLastRevision ( string lane ) : int
GetNextStep ( string lane ) : DBWork
GetRevision ( string lane, int revision ) : DBRevision
GetRevisionWork ( DBLane lane, DBHost host, DBHost workhost ) : DBRevisionWork

Will return a locked revision work.

GetRevisions ( string lane, int limit ) : List
GetSize ( int file_id ) : int
GetWork ( DBRevisionWork revisionwork ) : List
HasWork ( int lane_id, int revision_id, int host_id ) : bool
IgnoreWork ( int lane_id, int revision_id, int host_id ) : void
IsLatestRevisionWork ( DBRevisionWork current ) : bool

Checks if the specified RevisionWork is the latest.

LookupHost ( string host ) : DBHost
LookupHost ( string host, bool throwOnError ) : DBHost
LookupLane ( string lane ) : DBLane
LookupLane ( string lane, bool throwOnError ) : DBLane
Upload ( string filename, string extension, bool hidden, string compressed_mime ) : DBFile

Upload ( string md5, string path_to_contents, string filename, string extension, bool hidden, string compressed_mime ) : DBFile
UploadString ( string contents, string extension, bool hidden ) : DBFile

비공개 메소드들

메소드 설명
Connect ( ) : void

메소드 상세

Audit() 공개 메소드

public Audit ( MonkeyWrench who, string action ) : void
who MonkeyWrench
action string
리턴 void

BeginTransaction() 공개 메소드

public BeginTransaction ( ) : IDbTransaction
리턴 IDbTransaction

ClearAllWork() 공개 메소드

public ClearAllWork ( int lane_id, int host_id ) : void
lane_id int
host_id int
리턴 void

ClearWork() 공개 메소드

public ClearWork ( int lane_id, int revision_id, int host_id ) : void
lane_id int
revision_id int
host_id int
리턴 void

CloneLane() 공개 메소드

public CloneLane ( int lane_id, string new_name, bool copy_files ) : DBLane
lane_id int
new_name string
copy_files bool
리턴 MonkeyWrench.DataClasses.DBLane

CreateCommand() 공개 메소드

Creates a command with a default timeout of 300 seconds.
public CreateCommand ( ) : IDbCommand
리턴 IDbCommand

CreateCommand() 공개 메소드

Creates a command with the specified timeout. A timeout of 0 means infinity.
public CreateCommand ( System.TimeSpan Timeout ) : IDbCommand
Timeout System.TimeSpan
리턴 IDbCommand

CreateCommand() 공개 메소드

public CreateCommand ( string query ) : IDbCommand
query string
리턴 IDbCommand

CreateParameter() 공개 정적인 메소드

public static CreateParameter ( IDbCommand cmd, string name, object value ) : void
cmd IDbCommand
name string
value object
리턴 void

DB() 공개 메소드

public DB ( ) : System
리턴 System

DB() 공개 메소드

public DB ( bool Connect ) : System
Connect bool
리턴 System

DeleteAllWork() 공개 메소드

public DeleteAllWork ( int lane_id, int host_id ) : void
lane_id int
host_id int
리턴 void

DeleteFiles() 공개 메소드

Deletes all the files related to the work in the revision 'revision_id' of lane 'lane' on the host 'host'.
public DeleteFiles ( int host_id, int lane_id, int revision_id ) : void
host_id int
lane_id int
revision_id int
리턴 void

DeleteLinks() 공개 메소드

public DeleteLinks ( int host_id, int lane_id, int revision_id ) : void
host_id int
lane_id int
revision_id int
리턴 void

DeleteWork() 공개 메소드

public DeleteWork ( int lane_id, int revision_id, int host_id ) : void
lane_id int
revision_id int
host_id int
리턴 void

Dispose() 공개 메소드

public Dispose ( ) : void
리턴 void

Download() 공개 메소드

public Download ( DBFile file ) : Stream
file MonkeyWrench.DataClasses.DBFile
리턴 Stream

Download() 공개 메소드

public Download ( MonkeyWrench.DataClasses.DBWorkFile file ) : Stream
file MonkeyWrench.DataClasses.DBWorkFile
리턴 Stream

Download() 공개 메소드

public Download ( DBWorkFileView file ) : Stream
file MonkeyWrench.DataClasses.DBWorkFileView
리턴 Stream

ExecuteNonQuery() 공개 메소드

public ExecuteNonQuery ( string sql ) : int
sql string
리턴 int

ExecuteScalar() 공개 메소드

public ExecuteScalar ( string sql ) : object
sql string
리턴 object

GetAllHostLanes() 공개 메소드

public GetAllHostLanes ( ) : List
리턴 List

GetAllLaneFiles() 공개 메소드

public GetAllLaneFiles ( ) : List
리턴 List

GetAllLanes() 공개 메소드

Returns all the lanes in the database.
public GetAllLanes ( ) : List
리턴 List

GetCommands() 공개 메소드

public GetCommands ( int lane_id ) : List
lane_id int
리턴 List

GetDBRevisions() 공개 메소드

public GetDBRevisions ( int lane_id, bool ordered ) : DBRevision>.Dictionary
lane_id int
ordered bool
리턴 DBRevision>.Dictionary

GetDBRevisions() 공개 메소드

public GetDBRevisions ( int lane_id, int limit, bool ordered = true ) : List
lane_id int
limit int
ordered bool
리턴 List

GetDBRevisions() 공개 메소드

public GetDBRevisions ( int lane_id, int limit, int offset, bool ordered = true ) : List
lane_id int
limit int
offset int
ordered bool
리턴 List

GetHostLane() 공개 메소드

public GetHostLane ( int host_id, int lane_id ) : DBHostLane
host_id int
lane_id int
리턴 MonkeyWrench.DataClasses.DBHostLane

GetHosts() 공개 메소드

public GetHosts ( ) : List
리턴 List

GetHostsForLane() 공개 메소드

public GetHostsForLane ( int lane_id ) : List
lane_id int
리턴 List

GetLane() 공개 메소드

Returns lane that matches lane_id in the database
public GetLane ( int id ) : DBLane
id int
리턴 MonkeyWrench.DataClasses.DBLane

GetLaneHierarchy() 공개 메소드

This will return a list of lane ids: [0]: input lane_id [1]: [0]'s parent lane id [2]: [1]'s parent lane id etc
public GetLaneHierarchy ( int lane_id ) : List
lane_id int
리턴 List

GetLanes() 공개 메소드

Returns all the lanes for which there are revisions in the database
public GetLanes ( ) : List
리턴 List

GetLanesForHost() 공개 메소드

public GetLanesForHost ( int host_id, bool only_enabled ) : List
host_id int
only_enabled bool
리턴 List

GetLargeObjectSize() 공개 메소드

public GetLargeObjectSize ( int oid ) : int
oid int
리턴 int

GetLastRevision() 공개 메소드

public GetLastRevision ( string lane ) : int
lane string
리턴 int

GetNextStep() 공개 메소드

public GetNextStep ( string lane ) : DBWork
lane string
리턴 DBWork

GetRevision() 공개 메소드

public GetRevision ( string lane, int revision ) : DBRevision
lane string
revision int
리턴 DBRevision

GetRevisionWork() 공개 메소드

Will return a locked revision work.
public GetRevisionWork ( DBLane lane, DBHost host, DBHost workhost ) : DBRevisionWork
lane DBLane
host DBHost
workhost DBHost
리턴 DBRevisionWork

GetRevisions() 공개 메소드

public GetRevisions ( string lane, int limit ) : List
lane string
limit int
리턴 List

GetSize() 공개 메소드

public GetSize ( int file_id ) : int
file_id int
리턴 int

GetWork() 공개 메소드

public GetWork ( DBRevisionWork revisionwork ) : List
revisionwork DBRevisionWork
리턴 List

HasWork() 공개 메소드

public HasWork ( int lane_id, int revision_id, int host_id ) : bool
lane_id int
revision_id int
host_id int
리턴 bool

IgnoreWork() 공개 메소드

public IgnoreWork ( int lane_id, int revision_id, int host_id ) : void
lane_id int
revision_id int
host_id int
리턴 void

IsLatestRevisionWork() 공개 메소드

Checks if the specified RevisionWork is the latest.
public IsLatestRevisionWork ( DBRevisionWork current ) : bool
current DBRevisionWork
리턴 bool

LookupHost() 공개 메소드

public LookupHost ( string host ) : DBHost
host string
리턴 DBHost

LookupHost() 공개 메소드

public LookupHost ( string host, bool throwOnError ) : DBHost
host string
throwOnError bool
리턴 DBHost

LookupLane() 공개 메소드

public LookupLane ( string lane ) : DBLane
lane string
리턴 DBLane

LookupLane() 공개 메소드

public LookupLane ( string lane, bool throwOnError ) : DBLane
lane string
throwOnError bool
리턴 DBLane

Upload() 공개 메소드

public Upload ( string filename, string extension, bool hidden, string compressed_mime ) : DBFile
filename string
extension string
hidden bool
compressed_mime string
리턴 DBFile

Upload() 공개 메소드

public Upload ( string md5, string path_to_contents, string filename, string extension, bool hidden, string compressed_mime ) : DBFile
md5 string
path_to_contents string
filename string
extension string
hidden bool
compressed_mime string
리턴 DBFile

UploadString() 공개 메소드

public UploadString ( string contents, string extension, bool hidden ) : DBFile
contents string
extension string
hidden bool
리턴 DBFile