IFirebird
public interface IFirebird
This is an interface for accessing database engine.
string EditPath { get; }
Gets the path of a database file currently edited.
bool ConnectServer { get; }
Gets whether the database has connected with the server on a network.
bool ReadMember { get; }
Gets whether the access authority to the database is a read member.
DataSet ExecSelect(string sqlcmd)
Gets the result of an SQL query as DataSet of .NET Framework.
- sqlcmd
SQL query
FbResult ExecCommand(string sqlcmd)
Gets the result of an SQL query as FbResult class.
- sqlcmd
SQL query
void BeginTransaction()
Starts a transaction.
void Commit()
Finishes transaction processing.
void Rollback()
Starts a rollback.
void ExecNonQuery(string sqlcmd)
Runs an SQL query without the value to return.
- sqlcmd
SQL query
object ExecScalar(string sqlcmd)
Gets the result of an SQL query in a single Object class.
- sqlcmd
SQL query
bool ExistTable(string tablename)
Gets whether a specific table exists in the database.
- tablename
The table name to search for.
List<string> EnumBaseTable()
Gets the name of the tables which can be shown on a project panel as List class.
List<string> GetRelationalTables(string basetablename)
Gets all the tables related with the target table.
- basetablename
Target table name.
bool ExistData(string tablename, string where_key, object where_value)
Checks whether the item which is congruous with conditions exists.
- tablename
Target table name. - where_key
The field name to search. - where_value
The value of a condition.
bool MergeData(string tablename, IEnumerable<DictionaryEntry> entries, string target_key)
Add(INSERT) or replaces(UPDATE) data to the table. If there is no existing item and addition of data is done, it returns true. The item has already existed, and if replacement of the contents is done, it returns false.
- tablename
Target table name. - entries
Contents to register. This needs to consist of pairs of a field name and a value. - target_key
The field name to coincide. It will be replaced if the value specified as this field in entries is contained.
void InsertData(string tablename, IEnumerable<DictionaryEntry> entries)
Adds data to a table (runs INSERT sentence).
- tablename
Target table name. - entries
Contents to register. This needs to consist of pairs of a field name and a value.
void UpdateData(string tablename, IEnumerable<DictionaryEntry> entries, string where_key, object where_value)
Updates the data in a table (runs UPDATE sentence).
- tablename
Target table name. - entries
Contents to register. This needs to consist of pairs of a field name and a value. - where_key
The field name of accord conditions. - where_value
The value of accord conditions.
IFirebirdTable CreateIFirebirdTable(string tablename)
Creates the class treating the table for managing in the database. If new table data needs to be transmitted to VidyaVitamin from your plugin, please create an interface using this method.
- tablename
Target table name.