IFirebirdTable
This interface provides the data management of the table which database engine holds.
IFirebird IFirebird { get; }
Gets the interface of the database which holds the table.
string TableName { get; }
Gets the name of the table.
string AliasName{ get; }
Gets the alias of the table. If an alias does not exist, this is the same as "TableName".
string EditPath { get; }
Returns the path of a database file.
Dictionary<DBAttrType, string>(DBAttrType types)
Gets a parts name with the specified attribute as Dictionary class.
- types
Target attribute. Multiple attributes get simultaneously by an OR operation.
IList<DBAttributedData>(DBAttrType types, int min, int max)
Gets the value by a parts with the specified attribute.
- types
Target attribute. Multiple attributes get simultaneously by an OR operation. - min
The minimum number to get. - max
The maximum number to get. The value of data with the card number between the minimum and the maximum is returned.
IList<DBAttributedData> GetAttributedValue(DBAttrType type)
Gets the value which a parts with the specified attribute has from all the cards.
- types
Target attribute. Multiple attributes get simultaneously by an OR operation.
DBAttributedData GetAttributedValue(DBAttrType type, int id)
Gets the value of a card which has a specified attribute and a number.
- types
Target attribute. Multiple attributes get simultaneously by an OR operation. - id
Target card number.
FbFieldData[] GetTableFields()
Gets the information on the field.
string GetAliasName(string fieldname)
Gets the alias of the specified field.
string GetReferenceComboTableName(string partsname)
Gets the table name to which a combo box parts relates.
- partsname
Target combo box parts name.
string GetReferenceInListTableName(string parts)
Gets the table name to which a internal list parts relates.
- parts
Target internal list parts name.
FbResult EnumIndexes()
Enumerates the numbers of the existing cards as FbResult class.
- fieldname
Target field name.
int Count{ get; }
Gets the number of rows of a table.
int MinNumber{ get; }
Gets the smallest card number contained in the table.
int MaxNumber{ get; }
Gets the largest card number contained in the table.
int GetSkipedNumber(int current, int step)
Gets the nearest number in which a card exists within specified limits.
- current
The card number of a basis. - step
The number of the cards to skip. For example, if it is "GetSkipedNumber(40, 20)", the number of a card with 60 or more and the number nearest to 60 will be returned. This can also use a negative value(The value nearest to 20).
bool ExistNumber(int id)
If a row with the target number exists, it returns true.
void Insert(IEnumerable<DictionaryEntry[]> entries)
Adds a new row.
- entries
The item to add which made the field name and the value the pair. These are added depending on the number of iterator.
void Update(IEnumerable<DictionaryEntry[]> entries)
Updates multiple rows.
- entries
The item to add which made the field name and the value the pair. These are added depending on the number of iterator.
bool Merge(int targetid)
Adds an empty row, if a row with the specified card number does not exist.
- targetid
The target card number.
bool Merge(int targetid, List<DictionaryEntry> entries)
Adds row to the specified card number.
- targetid
The target card number. - entries
The item to add which made the field name and the value the pair. Please don't include ID field.
void Delete(int id)
Deletes a row with the specified card number.
- id
The target card number.
void Create(IEnumerable<SQLTypeDefine> defines, bool primary_id)
By the table name specified at the constructor, creates a table newly in the database.
- defines
The enumerator that SQL definitions ware contained. - primary_id
Sets whether the field name "ID" is made into a primary key. Please specify false, if the field named ID does not exist or it does not use as a primary key.
void Create(List<SQLTypeDefine> defines)
Creates the table which made ID the primary key. This is the same as "FirebirdTable.Create(defines, true)".
Drop()
Deletes a table with the subtables*1.
object Calculate(int id, CalculationType calctype, string formula)
Runs calculation. This returns the same result as a calculation text.
- id
The number of the target card to calculation. - calctype
Specifies the type of a return value. - formula
Formula. The function and the calculation method of using are the same as a calculation text.