<IMG
src="MlVlHyperNetDatabase/pubmethod.gif">AddField | Adds a field |
<IMG
src="MlVlHyperNetDatabase/pubmethod.gif">AddFieldIfNotExist | Adds a field if it not exists |
<IMG
src="MlVlHyperNetDatabase/pubmethod.gif">AddTable | Adds a table |
<IMG
src="MlVlHyperNetDatabase/pubmethod.gif">AddTableIfNotExist | Adds a table if it not exists |
<IMG
src="MlVlHyperNetDatabase/pubmethod.gif">Close | Closes a database |
<IMG
src="MlVlHyperNetDatabase/pubmethod.gif">Delete | SQL DELETE query <example>Example:
using HyperNetDatabase.R2;
...
Database db = new Database();
db.Open("file.hnd");
...
string StockName = "peppers";
DataTable result = db.Delete("Stock",
new object[,]{ {"NAME","=",StockName} }
);
...
Is the same as: DELETE Stock WHERE NAME=@StockName
WHERE expression: Is an C# expresion for making a where as a filter.
- new object[,]{ {"{FIELDNAME}",{operand},{parameter}},... } Is the same as
"field operand parameter AND ..."
- null Means the same as no where condition.
Operand | Effect |
---|
= | Equality | > | Value of left field name is greater than right constant value
variable | >= | Value of left field name is greater or equal than right constant value
variable | < | Value of left field name is less than right constant value
variable | <= | Value of left field name is less or equal than right constant value
variable | != | Value of left field name is different than right constant value
variable |
|
<IMG
src="MlVlHyperNetDatabase/pubmethod.gif">DropTable | Removes a table |
<IMG
src="MlVlHyperNetDatabase/pubmethod.gif">DropTableIfExists | Drops a table if the table exists |
<IMG
src="MlVlHyperNetDatabase/pubmethod.gif">Dump | Dumps pages state |
<IMG
src="MlVlHyperNetDatabase/pubmethod.gif">ExistsTable | Returns true if the table exists |
<IMG
src="MlVlHyperNetDatabase/pubmethod.gif">FlushIndexes | Destroys in memory indexes. Do this if your were walking for
many tables and you memory resources are low. |
<IMG
src="MlVlHyperNetDatabase/pubmethod.gif">ForcedInsert | Overloaded. More known as Update or Insert (Sets values by a
keyfield) Inserts if the condition does not match or updates if the condition
matches.<example>
db.ForcedInsert( "Stock", "NAME",
"Peppers", "Qty", 0.5m );
Is the same as:
SELECT Count(*) FROM STOCK WHERE NAME="Peppers";
if count > 0 then
UPDATE STOCK SET Qty=0.5 WHERE NAME="Peppers";
else
INSERT INTO STOCK (NAME,Qty)
VALUES ("Peppers",0.5);
|
<IMG
src="MlVlHyperNetDatabase/pubmethod.gif">ForcedSelect | Obtains a value and if it not exists obtains it's default value
|
<IMG
src="MlVlHyperNetDatabase/pubmethod.gif">GetTableNames | Gets all tables in this database |
<IMG
src="MlVlHyperNetDatabase/pubmethod.gif">GetUserFields | Fields for users |
<IMG
src="MlVlHyperNetDatabase/pubmethod.gif">Insert | Inserts data into a Table <example>Example:
using HyperNetDatabase.R2;
...
Database db = new Database();
db.Open("file.hnd");
...
string StockName = "peppers";
DataTable result = db.Insert(
"Stock", new object[,]
{ {"NAME",StockName}, {"QTY",0.5m} } );
...
Is the same as: INSERT INTO Stock (NAME,QTY) VALUES (@StockName,0.5);
SET expression: Is an C# expresion for indicate a FIELD with its
VALUE.new object[,]{ {"{FIELDNAME}",{parameter}},... } Is the same
as "SET field = parameter, ..."<example>Example 1:
new object[,]{ {"QTY",0.5m} }
<example>Example 2:
new object[,]{ {"STRNAME","peppers"},
{"QTY",0.5m} }
|
LogToFile (inherited from
LogSupport) | Saves a string in the log file |
<IMG
src="MlVlHyperNetDatabase/pubmethod.gif">Open | Open |
<IMG
src="MlVlHyperNetDatabase/pubmethod.gif">PreloadIndexes | Preloads indexes for table to make reads faster |
<IMG
src="MlVlHyperNetDatabase/pubmethod.gif">Select | SQL Select query. <example>Example:
using HyperNetDatabase.R2;
...
Database db = new Database();
db.Open("file.hnd");
...
string StockName = "peppers";
DataTable result = db.Select(null,"Stock",
new object[,]{ {"NAME","=",StockName} }
);
...
result = db.Select(new string[]{"NAME"},"Stock",
new object[,]{ {"NAME","=",StockName} }
);
...
Is the same as:
- SELECT * FROM Stock WHERE NAME=@StockName
- SELECT NAME FROM Stock WHERE NAME=@StockName
WHERE
expression: Is an C# expresion for making a where as a filter.
- new object[,]{ {"{FIELDNAME}", {operand},{parameter}},... } Is the same as
"field operand parameter AND ..."
- null Means the same as no where condition.
Operand | Effect |
---|
= | Equality | > | Value of left field name is greater than right constant value
variable | >= | Value of left field name is greater or equal than right constant value
variable | < | Value of left field name is less than right constant value
variable | <= | Value of left field name is less or equal than right constant value
variable | != | Value of left field name is different than right constant value
variable |
|
<IMG
src="MlVlHyperNetDatabase/pubmethod.gif">seqCreate | Overloaded. Creates a sequence. |
<IMG
src="MlVlHyperNetDatabase/pubmethod.gif">seqCurrentValue | Current sequence value |
<IMG
src="MlVlHyperNetDatabase/pubmethod.gif">seqDrop | Sequence drop |
<IMG
src="MlVlHyperNetDatabase/pubmethod.gif">seqExists | Sequence exists? |
<IMG
src="MlVlHyperNetDatabase/pubmethod.gif">seqNextValue | Next sequence value (and autoincrement) |
<IMG
src="MlVlHyperNetDatabase/pubmethod.gif">Update | SQL UPDATE query <example>Example:
using HyperNetDatabase.R2;
...
Database db = new Database();
db.Open("file.hnd");
...
string StockName = "peppers";
DataTable result = db.Update("Stock",
new object[,]{ {"NAME",StockName}, {"QTY",0.5m} },
new object[,]{ {"NAME","=","pepperoni"} }
);
...
Is the same as: UPDATE Stock SET NAME=@StockName, QTY=0.5 WHERE
NAME=pepperoni
WHERE expression: Is an C# expresion for making a where as a filter.
- new object[,]{ {"{FIELDNAME}",{operand},{parameter}},... } Is the same as
"field operand parameter AND ..."
- null Means the same as no where condition.
Operand | Effect |
---|
= | Equality | > | Value of left field name is greater than right constant value
variable | >= | Value of left field name is greater or equal than right constant value
variable | < | Value of left field name is less than right constant value
variable | <= | Value of left field name is less or equal than right constant value
variable | != | Value of left field name is different than right constant value
variable |
SET expression: Is an C# expresion for indicate a FIELD with its
VALUE.
new object[,]{ {"{FIELDNAME}",{parameter}},... } is the same as
"SET field = parameter, ..."
<example>Example 1:
new object[,]{ {"QTY",0.5m} }
<example>Example
2:
new object[,]{ {"STRNAME","peppers"},
{"QTY",0.5m} }
|