본문으로 건너뛰기

IDatabase

변수 지속성 및 이벤트 로깅을 포함한 데이터베이스 작업을 위한 인터페이스입니다.

네임스페이스: ControlBee.Interfaces

메서드

WriteVariables

변수 값을 데이터베이스에 씁니다.

int WriteVariables(VariableScope scope, string localName, string actorName, string itemPath, string value);

반환값: 데이터베이스 레코드 ID입니다.

WriteEvents

이벤트 레코드를 데이터베이스에 씁니다.

void WriteEvents(string actorName, string name, string severity, string? code = null, string? desc = null);

ReadAll

지정된 테이블의 모든 레코드를 읽습니다.

DataTable ReadAll(string tableName, QueryOptions? options = null);

Read

단일 변수 값을 읽습니다.

(int id, string value)? Read(string localName, string actorName, string itemPath);

반환값: ID와 값의 튜플이거나 null입니다.

ReadAllVariables

지정된 로컬 이름의 모든 변수를 읽습니다.

Dictionary<(string localName, string actorName, string itemPath), (int id, string value)> ReadAllVariables(string localName);

GetLocalNames

사용 가능한 모든 로컬(레시피) 이름을 반환합니다.

string[] GetLocalNames();

DeleteLocal

지정된 로컬 이름의 모든 데이터를 삭제합니다.

void DeleteLocal(string localName);

RenameLocalName

로컬 이름을 변경합니다.

void RenameLocalName(string sourceLocalName, string targetLocalName);

WriteVariableChange

변수 변경 레코드를 씁니다.

void WriteVariableChange(IVariable variable, ValueChangedArgs valueChangedArgs);

ReadVariableChanges

변수 변경 기록을 읽습니다.

DataTable ReadVariableChanges(QueryOptions? options = null);

GetConnection

기본 데이터베이스 연결을 반환합니다.

object GetConnection();

ReadLatestVariableChanges

가장 최근의 변수 변경 사항을 읽습니다.

DataTable ReadLatestVariableChanges();

참고