N Database
N Database
Table of Contents
Part I Introduction 1
1 Why NDat
...................................................................................................................................
abase? 1
2 Overview
................................................................................................................................... 2
3 How it ...................................................................................................................................
works 4
4 Release
...................................................................................................................................
Not es 4
Part IV Features 21
1 SODA...................................................................................................................................
Query 22
..........................................................................................................................................................
Building SODA Queries 23
SODA Query..........................................................................................................................................................
Graph 25
SODA Query..........................................................................................................................................................
API 26
..........................................................................................................................................................
Execut e SODA Query 29
2 Values
...................................................................................................................................
Query API 29
3 LINQ ...................................................................................................................................
t o NDat abase 34
4 LinqPad
...................................................................................................................................
Support 35
..........................................................................................................................................................
LinqPad for NDat abase - inst allat ion 36
..........................................................................................................................................................
LinqPad - Creat ing Typed Dat a Cont ext 38
5 Indexes
................................................................................................................................... 39
6 Transact
...................................................................................................................................
ions 39
7 In Memory
...................................................................................................................................
Dat abase 42
8 Triggers
................................................................................................................................... 42
9 Refact
...................................................................................................................................
oring 43
10 Logging
................................................................................................................................... 45
11 Except
...................................................................................................................................
ions 46
12 Ext ended
...................................................................................................................................
API 47
13 Non Persist
...................................................................................................................................
ent At t ribut e 47
14 Cascade
...................................................................................................................................
Delet e At t ribut e 47
15 OID Mapping
...................................................................................................................................
At t ribut e 49
16 Port abilit
...................................................................................................................................
y 51
17 Silverlight
...................................................................................................................................
and Windows Phone limit at ions 51
I
II NDat abase Manual
Part V Examples 52
1 Basic...................................................................................................................................
Sample 52
2 LinqPad
...................................................................................................................................
for NDat abase - Nort hwind 59
Part IX Reference 73
1 NDat abase
...................................................................................................................................
Namespace 73
.......................................................................................................................................................... 74
ILogger Int erface
ILogger Members ......................................................................................................................................................... 74
ILogger Methods ......................................................................................................................................................... 74
Debug Method ......................................................................................................................................... 75
Error Method ......................................................................................................................................... 75
Info Method ......................................................................................................................................... 76
Warning Method ......................................................................................................................................... 77
.......................................................................................................................................................... 77
OdbFact ory Class
OdbFactory Members ......................................................................................................................................................... 78
OdbFactory Methods ......................................................................................................................................................... 78
Delete Method ......................................................................................................................................... 78
Open Method ......................................................................................................................................... 79
OpenInMemory Method ......................................................................................................................................... 80
OpenLast Method ......................................................................................................................................... 80
.......................................................................................................................................................... 81
OIDFact ory Class
OIDFactory Members ......................................................................................................................................................... 81
OIDFactory Methods ......................................................................................................................................................... 82
BuildClassOID Method ......................................................................................................................................... 82
BuildObjectOID Method ......................................................................................................................................... 83
2 NDat abase.Api
...................................................................................................................................
Namespace 83
CascadeDelet ..........................................................................................................................................................
eAt t ribut e Class 84
CascadeDeleteAttribute Members ......................................................................................................................................................... 85
CascadeDeleteAttribute Constructor ......................................................................................................................................................... 86
CascadeDeleteAttribute Methods ......................................................................................................................................................... 86
CascadeDeleteAttribute Properties ......................................................................................................................................................... 87
..........................................................................................................................................................
IDat abaseId Int erface 87
IDatabaseId Members ......................................................................................................................................................... 87
IDatabaseId Methods ......................................................................................................................................................... 88
III
IV NDat abase Manual
V
VI NDat abase Manual
VII
VIII NDat abase Manual
5 NDat...................................................................................................................................
abase.Except ions Namespace 234
BTreeExcept ..........................................................................................................................................................
ion Class 234
BTreeException Members ......................................................................................................................................................... 235
BTreeException Methods ......................................................................................................................................................... 235
BTreeException Properties ......................................................................................................................................................... 236
..........................................................................................................................................................
BTreeNodeValidat ionExcept ion Class 236
BTreeNodeValidationException Members ......................................................................................................................................................... 237
BTreeNodeValidationException Methods ......................................................................................................................................................... 237
BTreeNodeValidationException Properties ......................................................................................................................................................... 238
..........................................................................................................................................................
Corrupt edDat abaseExcept ion Class 238
CorruptedDatabaseException Members ......................................................................................................................................................... 239
CorruptedDatabaseException Methods ......................................................................................................................................................... 240
CorruptedDatabaseException Properties ......................................................................................................................................................... 240
..........................................................................................................................................................
Duplicat edKeyExcept ion Class 240
DuplicatedKeyException Members ......................................................................................................................................................... 241
DuplicatedKeyException Methods ......................................................................................................................................................... 242
DuplicatedKeyException Properties ......................................................................................................................................................... 242
..........................................................................................................................................................
LinqQueryExcept ion Class 243
LinqQueryException Members ......................................................................................................................................................... 243
LinqQueryException Methods ......................................................................................................................................................... 244
LinqQueryException Properties ......................................................................................................................................................... 244
..........................................................................................................................................................
OdbRunt imeExcept ion Class 245
OdbRuntimeException Members ......................................................................................................................................................... 245
OdbRuntimeException Methods ......................................................................................................................................................... 246
OdbRuntimeException Properties ......................................................................................................................................................... 247
Index 0
1 Introduction
Welcome to the documentation of NDatabase.
To avoid impedance mismatch overhead between Object and Relational worlds, give a try to NDatabase.
NDatabase is a new generation Object Database: a real native and transparent persistence layer for
.NET which is really easy to use.
Project
You can find the project home site here. Additionally, on codeplex you can find project sources,
download files, discussions around the project and more.
Missing Documentation?
If you are missing documentation or feel that documentation is out of date, please let us know and that
will be fixed!
NDatabase is focused on storing any object in .NET in just one line. You don't need [Serializable]
attribute, you don't need any custom interface and you don't need to specify Object ID in your classes.
Just save your objects as they are.
You can save object with private fields, then you can query for this fields. Even if the private field is read-
only, it will be still stored as the part of the object and you can query for that any time. Circular
references, immutable types, Exception class, collections, arrays, nullable types, primitive types and
any custom type, all are supported by NDatabase.
Every release contains a lot of checks before it sees the light of the day. When features are committed,
TeamCity starts the job. It builds the library from the scratch, then it runs all unit tests and integration
tests which need to pass before having final version, then several metrics need to have acceptable
values: unit tests coverage, number of duplicates, inspections failure number (ReSharper inspections
embedded into TeamCity 7), so all things which are important for software high quality.
Finally, existing samples are checked if they are working correctly with the new version of NDatabase,
and that's the last yes or no for the release version. With every release you are sure, that delivered
product has high quality.
About 10% - 20% faster than Json.NET, faster than many built-in .NET serializers, at least as fast as
db4o and other object databases!
NDatabase is very simple and intuitive: the learning time is very short. Have a look at the NDatabase one
minute tutorial to check this.
The API is simple and does not require learning any mapping technique. There is no need for mapping
between the native objects and the persistence store.
Using NDatabase as your persistence layer will let you focus on your business logic allowing storing and
retrieving native objects in a single line of code. No more Relational to Object mapping is necessary,
NDatabase just persists objects the way they are, no matter their complexity.
Check existing features, NDatabase has much more to offer. If you still missing something, let us know!
1.2 Overview
NDatabase is a new generation Object Oriented Database. It is a real transparent persistence layer that
allows anyone to persist native .net objects with a single line of code.
NDatabase can be used as an embedded database engine that can be seamlessly integrated to any
product as an embedded database.
Simple
NDatabase is very simple and intuitive: the learning time is very short. Have a look at the NDatabase one
minute tutorial to check this. The API is simple and does not require learning any mapping technique.
There is no need for mapping between the native objects and the persistence store.
Small
The NDatabase library is less than 300kb and is distributed as a single dll that can easily be packaged
in any type of .net application.
The Meta-model
The objects
The indexes
Productivity
NDatabase lets you persist data with a very few lines of code. There is no need to modify the classes
that must be persisted and no mapping is needed. So developers can concentrate on business logic
implementation instead of wasting time with the persistence layer.
Easy to integrate
The only requirement to use NDatabase is to have a single dll on the application path.
Triggers
NDatabase currently supports 4 types of triggers:
Select trigger (after)
Insert trigger (before, after)
Delete trigger (before, after)
Update trigger (before, after)
Indexes
NDatabase supports field named indexes based on B-Trees which is accessible by NDatabase API.
Refactoring
NDatabase currently supports 4 types of refactoring:
Adding a new field (via API)
Removing a field (via API)
Rename a class (via API)
Rename a field (via API)
Logging
NDatabase is using widely embedded logger. You can write plug-in to use any external logger
Sample for log4net is here.
Northwind
Well-known Northwind database available as object database.
License
NDatabase 3.7
Redefine NDatabase structure - changes in namespaces, decoupling classes (see notes) - breaking
change
Values Query - refresh api, bug fixes, add unit tests and new documentation (see page) - breaking
change
Bug fix for UpdateMetaModel Exception on Added Class (see issue page)
NDatabase 3.6
Add multithreading and multiprocess support to NDatabase (Isolation Level - serializable, see more
info)
NDatabase is strongly signed assembly now
NDatabase 3.5
Add .net 4.5 version of NDatabase
Class resolver changed, now there is only one standard. Classes are always identified by assembly
qualified name, but if assembly cannot be found for the class, code will try to enumerate all assemblie
loaded into runtime to match the class. (BREAKING CHANGE)
All transactions are working in in-memory mode
Logging engine - simplify it, clean from non portable code, improve performance
Remove obsolete code invocation Assembly.LoadWithPartialName (http://ndatabase.codeplex.com/
workitem/902)
Move OrderByConstants and NonPersistentAttribute to NDatabase.Common namespace (BREAKING
CHANGE)
Additional changes:
Silverlight, CompactFramework and Windows Phone versions will not be actively developed any more.
Last stable version (NDatabase 3.4) you can find in mobile branch, and in master35 branch (CF). Feel
free to adapt them to your needs.
NDatabase 3.4
Performance improvements: Buffer.BlockCopy instead of Array.Copy, simplify logging messages -
remove less important messages
Add FSharp sample project
Add WCF sample
Fix issue with hidden exceptions during triggers execution
Remove console logger from engine, it could be attached on demand (simple class), and it is thing
which cannot be moved to other .net platforms (mobile, silverlight)
Remove TransactionId (that's causing changes in db even when we are only querying for data) - this is
not exactly related to transaction engine
NDatabase 3.3
Two new versions of NDatabase (Silverlight, Windows Phone 7) (see limitations)
Two new samples covering Silverlight app and Windows Phone app
Performance Improvements in Internal Engine
NDatabase 3.2
Portability - implementing less restricted Type resolution - without assembly name (namespace and
class name are used)
Remove bug in Class introspector (it processed only user classes) (internal)
Remove partition of classes to user classes and system classes. Now all classes are treated in the
same way (internal)
Fix in RefactorManager - rename class refactoring, remove field refactoring (Refactoring API)
Add unit tests for RefactorManager class (internal)
Generating less restricted Northwind database regarding Type resolution - Northwind is portable now
(Northwind sample db)
Fix ObjectRepresentation - setting values of object attribute (Triggers API)
Add unit tests for ObjectRepresentaiton class (internal)
Add documentation for SODA queries in documentaiton
NDatabase 3.1
NDatabase as In-Memory Database
remove app.config files from samples
New project home page - http://ndatabase.wix.com/home
New project documentation page - http://ndatabase.net/
Updating and adding xml documenation which covers all public api
performance improvements in seeking the file (changing position happen only just before reading or
writing)
minor cleanup (remove unused things, update access levels)
improve design of Northwind sample - extract typed data context to another library
move NonPersistentAttribute to Odb.Core namespace
move IConstraint to Odb.Core.Query namespace
move IRefactorManager to Odb.Core namespace
Move all exception or error related classes under NDatabase.Exceptions namespace
move OIDFactory to Odb.Core namespace
move IOdbComparable to Odb.Core namespace
NDatabase 3.0
Query API interface changed to SODA queries
Linq to NDatabase added (support for Linq, translated to SODA queries)
LinqPad driver added
Sample database prepared - northwind.ndb (with generator from Sql Server)
Collections and dictionaries are now saved as normal objects (they could be stored directly in
NDatabase) - breaking db layer change
Namespaces are again starting with NDatabase (instead of NDatabase2), with the new versions only
assembly name will be changed, now it is NDatabase3.dll
Minor bug fixes
Signing NDatabase assembly
NDatabase moved to GIT
Update DB version to 30
NDatabase 2.2
Migration to .NET 4
Add support for unsigned int, short, long and signed byte to NDatabase
Improve Triggers API (make it similar to Index one) - breaking change
Remove from IOdb interface methods like AddUpdateTrigger , AddDeleteTrigger , etc.
Add to IOdb interface ITriggerManager TriggerManagerFor<T>() where T : class method, which
allows on all CRUD operations in terms of triggers
Changing base NDatabase API to be more developer friendly - breaking change
Instead of GetObjects<T> methods in IOdb interface we have Query<T> methods
IClassRepresentation replaced with IIndexManager which controls access/creation of indexes
(simplify the Index API)
CriteriaQuery methods of IOdb interface replaced with more meaningful CreateCriteriaQuery
methods (they are factory methods)
Change IOdb inteface's GetName method to GetDbId (more meaningful)
Rename IObejcts<T> inteface with IObjectSet<T> (more Soda standard here)
Update access level of NDatabase exception constructors (all are internal)
Make all internal exceptions the concrete classes of OdbRuntimeException (all NDatabase
exceptions are public)
Update db version to 20, earlier db files are not compatible (need to use converter) (db version
compatibility runtime check)
Add Exception Handling Sample
Add CSV Sample, which is showing how to take advantage when we will process csv file into
NDatabase with index (querying data - performance about 4 times better than when using FileHelpers)
public static IConstraint InvariantEqual<T>(string attributeName, T value) method
relaced with public static IConstraint InvariantEqual(string attributeName, string
value)
Clean CriteriaQuery internal code (preparing for LINQ Provider implementation)
More minor cleanup
NDatabase 2.0
namespaces, dll name both are changed to NDatabase2
query API is changed. Now it is using generics in every possible place
changing the way, how fields from class are stored - for now they are ordered by name which allows db
on working well even if someone will change the order of fields in class definition - breaking change
Added Coverter between NDatabase 1.0.4 and NDatabase 2.0
Update Logging API, clean code connected with Logging API and logging usage in NDatabase (http://
ndatabase.codeplex.com/workitem/802,)
Add documentation for NDatabase logging
Make the ODBRuntimeException the public class (possibility to catch NDatabase exception for
external world), the same for IError
remove boxing in many places (all possible places for now are using underlying types)
Enum is serialized as the class, not any more as the string
cleaned OdbConfiguration
fixed bug for indexes on property names
add new unit tests for Layer 2 and Layer 3
Fixed minor bug in ObjectIntrospector - comparing full class name with simple class name
Samples updated to NDatabase 2.0.1
NDatabase 1.0.4
© 2014 Jacek Spolnik
8 NDat abase Manual
NDatabase 1.0.3
Decimal is now treated as the native type
Decimal is binary serializable for now instead of using string serialization
add new unit tests
code fixes (replace ArrayList with List<object> when applicable)
fixed issue with AutoDelete
Fix issues from code inspections (TeamCity)
NDatabase 1.0.2
performance improvements, see the page
couple of new unit tests
code clean up & unit tests cleanup
NDatabase 1.0.1
Initial stable version of NDatabase Lightweight C# Object Database
2 Getting Started
The best way to learn how to use NDatabase is to have a look to these two small tutorials:
1 Minute Tutorial
5 Minutes Tutorial
Here, a C# instance is created, the NDatabase database is opened, the store method is called to save
two objects and then the database is closed (auto commit). After that we could use persisted objects, so
database is opened again and then we are displaying the content of persisted objects.
To restore instance by class, we simply need to use Query<T> method to create a query for T type
objects, and then we are executing this query. The result will contain all objects derived from mentioned
base class or interface.
// store them
using (var odb = OdbFactory.Open(dbFileName))
{
odb.Store(mage);
odb.Store(warrior);
}
#endregion
#endregion
If you want to learn more about NDatabase, click here to have a look at the 5 minutes tutorial.
// Create 4 players
var player1 = new Player("julia", DateTime.Now, volleyball);
var player2 = new Player("magdalena", DateTime.Now, volleyball);
var player3 = new Player("jacek", DateTime.Now, volleyball);
var player4 = new Player("michal", DateTime.Now, volleyball);
Assert.That(players, Has.Count.EqualTo(1));
}
Assert.That(players.Count(), Is.EqualTo(1));
}
Assert.That(players, Has.Count.EqualTo(4));
}
Assert.That(players.Count(), Is.EqualTo(4));
}
Assert.That(volleyBall.Name, Is.EqualTo("volley-ball"));
// Now build a query to get all players that play volley ball, using
// the volley ball object
query = odb.Query<Player>();
query.Descend("FavoriteSport").Constrain(volleyBall).Identity();
Assert.That(players, Has.Count.EqualTo(4));
}
Assert.That(volleyBall.Name, Is.EqualTo("volley-ball"));
// Now build a query to get all players that play volley ball, using
// the volley ball object
var players = from player in odb.AsQueryable<Player>()
where player.FavoriteSport.Equals(volleyBall)
select player;
Assert.That(players.Count(), Is.EqualTo(4));
}
(query.Descend("FavoriteSport._name").Constrain("volley-ball").Equal())
.Or(query.Descend("FavoriteSport._name").Constrain("%nnis").Like());
Assert.That(players, Has.Count.EqualTo(5));
}
Assert.That(players.Count(), Is.EqualTo(5));
}
Assert.That(players, Has.Count.EqualTo(1));
}
Assert.That(players.Count(), Is.EqualTo(1));
}
Assert.That(players, Has.Count.EqualTo(4));
}
Assert.That(players.Count(), Is.EqualTo(4));
}
Assert.That(teams, Has.Count.EqualTo(1));
}
Assert.That(teams.Count(), Is.EqualTo(1));
}
Assert.That(players, Has.Count.EqualTo(5));
query.Descend("Name").OrderDescending();
players = query.Execute<Player>();
Assert.That(players, Has.Count.EqualTo(5));
}
Assert.That(players.Count(), Is.EqualTo(5));
Assert.That(players.Count(), Is.EqualTo(5));
}
3 Basic Configuration
Usually, there is no need for changing default settings of NDatabase, only logging could be the exception
of that.
To set custom settings, you have to use OdbConfiguraiton static class. Take a look below on all
possibilities:
Logging Configuration
Indexes Configuration
OdbConfiguration.EnableLogging();
This method is turning on logging mechanism, but still you need to inject implementation of ILogger
interface:
namespace NDatabase
{
/// <summary>
/// Base interface for creacting custom logger
/// </summary>
public interface ILogger
{
/// <summary>
/// Log message with warn level
/// </summary>
/// <param name="message">Mssage to log</param>
void Warning(string message);
/// <summary>
/// Log message with debug level
/// </summary>
/// <param name="message">Mssage to log</param>
void Debug(string message);
/// <summary>
/// Log message with info level
/// </summary>
/// <param name="message">Mssage to log</param>
void Info(string message);
/// <summary>
/// Log message with error level
/// </summary>
/// <param name="message">Mssage to log</param>
void Error(string message);
}
}
OdbConfiguration.DisableLogging();
For more details about logging, to see how implement log4net logger, check the logging page.
OdbConfiguration.EnableBTreeValidation();
OdbConfiguration.DisableBTreeValidation();
4 Features
One single database file to store all data:
o Meta-model
o Objects
o Indexes
Handles circular references, private members (even marked as readonly)
Safe access from many threads and from many processes
NoSQL, Linq support and SODA queries
Values Queries, supporting metrics like Max, Min, Avg, Count and others
Compatible with LinqPad
Transactions Support (ACID)
Store any object, no need for Serializable attribute, OID, or anything else
For most applications LINQ will be the better querying interface. However there can be applications
where dynamic generation of queries is required, or you want to have an access to private or internal
fields.
SODA and Values Query are also an underlying NDatabase querying mechanism. LINQ query syntax is
translated to SODA under the hood.
Understanding SODA will provide you with a better understanding of NDatabase in the whole and will help
to write queries and applications with better performance.
See more:
Building SODA Queries
A new Query object is created through the Query method of the IOdb and we can add IConstraint
instances to it. To find all Warrior instances, we need to invoke generic Query method with type as
Warrior class.
Additionally, for the case when you are interested only in retrieving all instances of given type, you can
use simplified form:
Basically, we are using meta description of the objects we'd like to hunt down: a query graph made up of
query nodes and constraints. A query node is a placeholder for a candidate object, a constraint decides
whether to add or exclude candidates from the result. In above simple case, we constrain the type during
creation of the query.
We're just asking any candidate object (here: any object in the database) to be of type Warrior to
aggregate our result.
To get a warrior by name, we have to further constrain the candidate warriors by descending to their
name field and constraining this with the respective candidate String.
What does 'descend' mean here? Well, we can attach constraints to child members of our candidates.
So a candidate needs to be of type Warrior and have a member named '_name' that is equal to the given
String to be accepted for the result.
Inheritance
In the case of inherited classes of interfaces:
querying against parent class or interface will include results for all subclasses/implementations
barConstraint().Greater();
5. Execute query
Additionally, if you are doing only 1 and 5 steps (so you want to get all Foo instances from
database), you can use simplified syntax:
There are occasions when we don't want to query for exact field values, but rather for value ranges,
objects not containing given member values, etc. This functionality is provided by the Constraint API.
Not
First, let's negate a query to find all warriors who are not "Warrior 1":
And
Where there is negation, the other boolean operators can't be too far:
Or
public void GetWarriorByDisjunction()
{
IOdb odb = OdbFactory.Open(DbName);
try
{
IQuery query = odb.Query<Warrior>();
var nameConstraint = query.Descend("_name").Constrain("Warrior 1").Equal();
query.Descend("_attack").Constrain(3).Or(nameConstraint);
IObjectSet<Warrior> result = query.Execute<Warrior>();
PrintResult(result);
}
finally
{
odb.Close();
}
}
We can also constrain to a comparison with a given value. Return warriors with more than 2 attack
points:
query2.Descend("_name").Constrain("rior").Contains();
IObjectSet<Warrior> result1 = query2.Execute<Warrior>();
PrintResult(result1);
query3.Descend("_name").Constrain("rior").Like();
IObjectSet<Warrior> result2 = query3.Execute<Warrior>();
PrintResult(result2);
}
finally
{
odb.Close();
}
}
Normal mode
Execute<T>() - allows on executing any SODA query
Additionally, we could use method SetReturnInstance to decide, if we want to work with instances or just
with object representations (lightweight meta representation of objects - IObjectRepresentation).
There is minor difference regarding executing values query in comparison to normal query: you cannot
use generic execute methods, because they will cause unsupported operation exception
(OdbRuntimeException). For values query, there is much simple Execute method which needs to be
invoked to take the IValues result.
/// <summary>
/// The main interface of all Object Values query results of NDatabase ODB
/// </summary>
public interface IValues : IObjectSet<IObjectValues>
{
/// <summary>
/// Get next values set
/// </summary>
/// <returns>Next values</returns>
IObjectValues NextValues();
}
This interface could be used in the same as normal result from NDatabase queries, or we could wrap
results in IObjectValues implementation by invoking NextValues method:
/// <summary>
/// Interface that will be implemented to hold a row of a result of an Object Values Query
/// </summary>
public interface IObjectValues
{
/// <summary>
/// Get result by alias
/// </summary>
/// <param name="alias">Alias for result</param>
/// <returns>Object result</returns>
object GetByAlias(string alias);
/// <summary>
/// Get result by index
/// </summary>
/// <param name="index">Index for result</param>
/// <returns>Object result</returns>
object GetByIndex(int index);
/// <summary>
/// Get values result
/// </summary>
/// <returns>Array of objects as values</returns>
object[] GetValues();
}
It allows us on just take the values as objects array, get them by the index or, what's more important,
take the value by alias. Aliasing allows us on easier manipulation on the results, we could calculate
many metrics and give them aliases which will make easier to query them from result set.
All operations are supporting aliasing, only GroupBy isn't, which make sense because of its nature. It
should be used with other metric, for which we want to group the results.
Examples
Class used through examples:
Below code was used to generate sample data set, for calculating below metrics:
Sum
IValues values;
Min
IValues values;
Max
IValues values;
Avg
IValues values;
Count
IValues values;
Field
IValues values;
objectValues = values.NextValues();
Assert.That(objectValues.GetByAlias("field"), Is.EqualTo(2));
objectValues = values.NextValues();
Assert.That(objectValues.GetByAlias("field"), Is.EqualTo(3));
objectValues = values.NextValues();
Assert.That(objectValues.GetByAlias("field"), Is.EqualTo(4));
objectValues = values.NextValues();
Assert.That(objectValues.GetByAlias("field"), Is.EqualTo(5));
objectValues = values.NextValues();
Assert.That(objectValues.GetByAlias("field"), Is.EqualTo(6));
objectValues = values.NextValues();
Assert.That(objectValues.GetByAlias("field"), Is.EqualTo(7));
objectValues = values.NextValues();
Assert.That(objectValues.GetByAlias("field"), Is.EqualTo(8));
objectValues = values.NextValues();
Assert.That(objectValues.GetByAlias("field"), Is.EqualTo(9));
objectValues = values.NextValues();
Assert.That(objectValues.GetByAlias("field"), Is.EqualTo(10));
objectValues = values.NextValues();
Assert.That(objectValues, Is.Null);
Sublist (string)
IValues values;
Assert.That(stringBuilder.ToString(), Is.EqualTo("lt1"));
Size (string)
IValues values;
GroupBy
IValues values;
//ODD
var objectValues = values.NextValues();
Assert.That(objectValues.GetByAlias("sum_group"), Is.EqualTo(25m));
//EVEN
objectValues = values.NextValues();
Assert.That(objectValues.GetByAlias("sum_group"), Is.EqualTo(30m));
IValues values;
objectValues = values.NextValues();
Assert.That(objectValues, Is.Null);
Prerequisites
Download free LinqPad version from project home page.
Download ndatabaselinqpaddriver_3.lpx LinqPad driver.
Click the “Browse" button and import a ndatabaselinqpaddriver_3.lpx file. Once clicked, the driver will
become visible in the previous dialog, and you can create new NDatabase connection.
A typed data context does not need base class. The following is perfectly valid:
4.5 Indexes
How to use indexes
To use index, firstly you need to invoke method IndexManagerFor<T> on IOdb instance, with T as the
class for which field you want to add index.
Sample code
using (var odb = OdbFactory.Open("index1.ndb"))
{
odb.IndexManagerFor<Player>().AddUniqueIndexOn("nameIndex", "Name");
odb.IndexManagerFor<Game>().AddIndexOn("nameIndex", "Result");
Configuration
To check configuration possibilities for indexes, please check indexes configuration page.
Implementation
Indexes are implemented using B-Tree structure.
The namespace NDatabase.BTree contains a generic B-Tree implementation.
Index definitions are stored in NDatabase as normal objects of class
NDatabase.Meta.ClassInfoIndex (this internal class is marked as a system class).
Index content is stored in NDatabase as NDatabase.BTree.IBTree and
NDatabase.BTree.IBTreeNode (internal classes).
4.6 Transactions
NDatabase uses transactions to guarantee database integrity (ACID properties).
When an NDatabase database is opened, a session is automatically created. The session contains a
special object representing transaction. The transaction instance manage all the data and behavior of the
current transaction.
When executing an operation (insert, update, delete) that modifies the database, some parts of the
operation can be directly written to the database file (buffers for IO performance) other can not.
Example
When inserting a new object, the object can be written directly to the database but references to this
object can not. In this case, references are written in the transaction (as a list of write actions).
So basically, NDatabase is being optimistic and write almost everything to the database. Only pointers
and data from update and delete are written in the Transaction. The writing in Transaction begins as soon
as the implicit transaction is created by NDatabase. On commit, the transaction content is applied to
main database file.
The Transaction keep a list of write actions (that contain data that can not be written directly) in memory.
On Commit, if all write actions are on memory, NDatabase simply apply them to the database file.
If not, NDatabase first loads them from the Transaction and then apply them to the database file. After
commit, the transaction is deleted.
Commit Process
The database can be divided into 2 different zones:
Committed Zone - the committed zone contains all committed work.
Uncommitted (Unconnected) zone - uncommitted zone contains all the work that has not been
committed yet,work of open transactions. All new objects and modifications must be created in the
uncommitted zone.
The Unconnected Zone contains all the new objects without any link (pointers) from the committed zone.
All new objects are actually written in the database file and will stay in the database in case of rollback
but they will be unreachable so it will not bring inconsistency!
The Connected Zone contains write actions (that represents object updates and deletes) that will be
applied to the committed zone when committed.
When Committing
Uncommitted Transaction Zone - all first new objects must be connected to last committed objects
(previous object OID and next object OID). This must be done for all new objects types.
Connected TransactionZone - write actions must be applied to the committed zone.
Example
Firstly, we have to prepare to objects, which we will use in the sample. Below you can see the class of
which the objects we will create.
Now, we will store both objects. After storing a object we will commit changes, after storing b object we
will rollback changes. That will allow us on saving part of changes, and on reverting the others.
As we can see in below assertions, only one object (a) is stored, and all values of it are equal to what we
stored.
Here, we are changing both properties of the stored object, but only first update will be stored because
we commited it. Change of the value was reverted, as you can see in below code:
Final results:
Below you can find the sample, how to use in memory mode:
inMemory.Store(inMemoryTestClass);
// Further processing
}
4.8 Triggers
To add a trigger, the first step is to build a class that implements one of the trigger interface.
Update trigger contains IObjectRepresentation item which is used to give the user an instance of an
object representation. The Object Representation encapsulates the NonNativeObjectInfo which is the
internal object representation.
return true;
}
4.9 Refactoring
During database lifetime, your class definitions could be change. NDatabase provides refactor manager,
which is helping to solve these changes.
Example
User class before changes
4.10 Logging
To enable or disable logging, add own logger - check logging configuration page.
OdbConfiguration.EnableConsoleLogger();
Below you have log4net custom logger, which allows us to reuse existing log4net framework for logging
purposes in NDatabase
#endregion
}
OdbConfiguration.RegisterLogger(new Log4NetLogger());
4.11 Exceptions
NDatabase uses an own exception type to handle errors : ODBRuntimeException
The constructor of that handles an instance of IError (internal) which describes the reason of exception.
To get access to the extended API, just call IOdb.Ext(). Here is an example:
[NonPersistent]
private readonly string _password;
After storing User class instance, password field will be omitted from this process (will have default value
which is in this case null).
Example
[CascadeDelete]
private readonly Address _address1;
Working sample:
OdbFactory.Delete(DbName);
count = odb.QueryAndExecute<Address>().Count;
Assert.That(count, Is.EqualTo(1));
In this example we could see that one address is deleted while we deleted only the parent (the one
marked with cascade delete attribute), and the second one still exists in database.
Example
Class with long field marked with OID attribute:
OdbFactory.Delete(DbName);
const string value = "value";
Assert.That(first.OID, Is.GreaterThan(0L));
Assert.That(first.Value, Is.EqualTo(value));
}
OdbFactory.Delete(DbName);
const string value = "value";
Assert.That(first.OID, Is.Not.Null);
Assert.That(first.OID.ObjectId, Is.GreaterThan(0));
Assert.That(first.Value, Is.EqualTo(value));
}
Class with other type of field marked with OID attribute (in this case string):
Usage (when we assign OID attribute to field which is not of type long nor OID, the value of this field is
not changed):
OdbFactory.Delete(DbName);
const string value = "value";
Assert.That(first.OID, Is.Null);
Assert.That(first.Value, Is.EqualTo(value));
}
4.16 Portability
NDatabase could work in two modes regarding Type Resolution: normal mode and less restricted mode.
The change between this two options is automatic.
In this mode, Types are identified by namespace and class name, or by namespace, class name and
different assembly than you have specified in assembly qualified name of the class.
The second option is always turned on, when first one cannot resolve the type. E.g., if assembly version
was changed then you cannot use the same assembly qualified name to resolve class. But the less
restricted mode comes to help and you can still use all of your stored objects even after changing the
version of assembly, or after moving classes between different assemblies.
You cannot store instances of classes which are containing public properties (public properties are
generating private backing fields which are responsible for storing properties data).
You cannot use properties in Linq to NDatabase
5 Examples
Here you can find several samples, which are showing NDatabase in action:
Basic sample - creating simple structure of objects, storage, updating and deleting of objects.
Use NDatabase with LinqPad - Northwind sample.
Items
In our data model we have two kinds of items: armor and weapon. Both contain attributes: attack and
defense which will modify warrior attributes.
#endregion
#endregion
The initial state of warrior doesn't contain the items. So we need to mark that there is no item there. To
do that we are using class NoItem:
private NoItem()
{
}
#endregion
Warrior
This interface contains two items. One is hold in left hand and the second in the right hand. Additionally,
hero is described by his level, name and two attributes: attack and defense. Attack and defense
attributes are modified by items which hero has assigned.
_name = name;
RightHand = NoItem.Instance;
LeftHand = NoItem.Instance;
Attack = 3;
Defense = 3;
}
#endregion
Storing objects
Firstly, we create the two warrior objects with a different names.
To store the objects we need to open our database with parameter as the name of our db file. Our db file
name is defined by constant string:
Now we could open our database and store prepared two objects.
Updating them
Now, is the time for preparing our equipment which could be used by our powerful warriors.
Now we could open our database and retrieve already stored objects. Then we could use prepared items
to update warriors, and then store them back into database.
For the case when you are opening database with the same name as for the first time, you can use
OdbFactory.OpenLast() method to do that easier.
warriors[0].RightHand = sword1;
warriors[0].LeftHand = field1;
warriors[1].RightHand = sword2;
warriors[1].LeftHand = field2;
odb.Store(warriors[0]);
odb.Store(warriors[1]);
}
Now our database contains updated warriors, and we could perform some action on them.
NoItem
Sword +5A
Sword +3A
Field +3D
Field +5D
Finally, we are querying for warriors and displaying them in the same way as for items. After that, we will
remove both objects from db.
Console.WriteLine("Remove warriors");
odb1.Delete(warriors[0]);
odb1.Delete(warriors[1]);
}
[Warrior 1]: RH: Sword +5A, LH: Field +3D, Att: 8, Def: 6, Lvl: 1
[Warrior 2]: RH: Sword +3A, LH: Field +5D, Att: 6, Def: 8, Lvl: 1
Now are database should have no warrior objects. To check that we will query for warriors again, and we
will check the count of returned items.
int count;
using (var odb = OdbFactory.OpenLast())
count = odb.QueryAndExecute<Warrior>().Count;
Warriors count: 0
Prerequisites
See how to install driver: LinqPad installation page.
Download northwind.ndb
Download NDatabase_LinqPad_Northwind_Sample.zip
Configure sample
1. Unpack somewhere NDatabase_LinqPad_Northwind_Sample.zip.
2. NDatabase.Northwind.Domain.dll contains schema classes, which were used to store objects and
additionally, it contains typed data context
NDatabase.Northwind.Domain.NDatabaseNorthwindDataContext which will allow LinqPad to query
NDatabase norhtwind db
3. Set in NDatabase.Northwind.Domain.dll.config path to northwind.ndb (full path is needed).
Run queries
Run the command from screen. You can replace "Names" with any value from the below result:
using System.Collections.Generic;
using System.Configuration;
using System.Linq;
using NDatabase.Northwind.Domain;
using NDatabase;
namespace NDatabase.Northwind.TypedDataContext
{
public class NDatabaseNorthwindDataContext
{
static NDatabaseNorthwindDataContext()
{
if (ConfigurationManager.AppSettings.AllKeys.Contains("DbFilePath"))
{
DbName = ConfigurationManager.AppSettings["DbFilePath"];
}
else
{
throw new ConfigurationErrorsException(
"You are missing key 'DbFilePath' in your <appSettings>. Key has to contain va
}
}
{
get
{
IList<Employee> result;
using (var odb = OdbFactory.Open(DbName))
{
result = odb.Query<Employee>().Execute<Employee>().ToList();
}
return result;
}
}
}
}
{
result = odb.Query<CustomerDemographics>().Execute<CustomerDemographics>().ToL
}
return result;
}
}
6 Internal Architecture
Here you can find pages describing, how internally NDatabase is working, which assumptions it is
following, etc:
OIDs
Layers
File Format
Execution Mode
6.1 OIDs
OID stands for Object ID.
In NDatabase, every entity (class or object) has an OID.
An OID uniquely identifies an entity in the NDatabase.
NDatabase has special blocks to keep associations between the OID and the physical position of the
entity in the database file. The OID allows a direct access to the object with a reduced number of IO
operations.
All pointers in the database use OIDs. When an object has a relation with another, the relation is
stored using the OID object, for example:
o If a user has an attribute profile (with OID 15), the user object will be stored as having a relation with
the OID 15.
Implementation
The OID is represented by OID interface. Default implementations are internal classes ClassOID and
ObjectOID.
OIDs are managed by the IdManager internal class, which implements internal IIdManager interface.
6.2 Layers
NDatabase engine contains 3 layers of abstraction to manage the data:
Layer 1: Instance Layer
Layer 2: Meta representation of objects and classes
Layer 3: The physical storage
Indexes are stored in the database as normal objects using the ClassInfoIndex class. This class is
marked as a system class.
Internal storage
In the current version of NDatabase, entities are stored in the database file as two ways linked list.
An object which is managed by a NonNativeObjectInfo (Layer 2) object contains the data of the objects,
This pointers allow the navigation from an object to other. Like a two ways linked list. This is simple way
to handle object navigation but have some drawbacks for the Isolation property of ACID: this issue will be
fixed in some future version.
6.3.2 ID Block
The ID Block is used to store all ids of objects and classes. In the ID Block, the following data are
stored:
The Object/class ID
The OID type (Object or class)
The physical position of the object with the OID
An indicator to say if OID is still active. For example deleted objects are marks as deleted
The NDatabase header holds the position of the first ID block (field 10).
The ID Block can contains up to 1000 OIDs definitions. It has a fixed size :
ID Block size = size of header + 1000 * size of a repetition = 34 + 1000 * 18 = 18034 bytes
The ID Blocks are managed by the IdManager internal class. The actual writing into database file is done
by the another internal class, ObjectWriter.
ID Block Header
ID Block Repetition
No Field Description Size
1 ID type To indicate if it is an ID of object or class 1 byte
2 OID The Object ID 1 long
3 Status The status of the OID, 1 = Active, 2 = Deleted (ID Status) 1 byte
4 Position The physical position of the object with this OID 1 long
First write a block of NbAttributes elements. Each element contains the id of the attribute (int) and the
OID or position of the value of the attribute.
Then writes the values of the attributes. Values of Native Objects are written in place. Non Native Objects
are written at the end of the file.
Arrays
Native Attributes
The bytes that represent the string are encoded using UTF-8.
Local mode is used when one want to run NDatabase as an embedded database.
NDatabase runs within the application as the part of it.
This is the easiest and fastest way to execute Object Database.
Database could be used by many threads, or by many processes with many threads.
7 Project Origin
Firstly, I want to thanks Olivier Smadja for his work on NeoDatis java version. He did a great job and
based on that I could create a NDatabase project.
Project derives from NeoDatis ODB project. The .net version of this project was never released (as the
stable version). The work is based on NeoDatis.Net 1.9-beta6 code, which you can find there.
Documentation about NeoDatis could be found here.
NDatabase was radically changed in comparison to NeoDatis.Net code base, but still the core
architecture is living there. You can find more documentation about NeoDatis here.
remove unwanted things like Client/Server functionality (NDatabase is focused on embedded solution).
updated documentation which fits to the C# world
all queries are polymorphic
API improvements
performance improvements
and more and more, with the time the amount of changes will increase
You need to remember, that this both solutions are not compatible and the File Format could be different
for both.
8 FAQ
Do my objects need to implement a specific NDatabase interface to persist them ?
No, there is no restriction on objects to be stored.
Is it possible to ignore some fields in a class, so that they don't get stored ?
Yes, you need to use [NonPersistent] attribute. Here you can find information about this attribute.
9 Reference
The Public API is prepared based on xml documentation of NDatabase project (prepared by Sandcastle).
Classes
Class Description
OdbFactory The NDatabase Factory to open new instance of local odb.
Interfaces
Interface Description
ILogger Base interface for creacting customlogger
Namespace: NDatabase
Assembly: NDatabase3 (in NDatabase3.dll)
Syntax
Visual Basic
P ublic Interface ILogger
C#
public interface ILogger
Visual C++
public interface class ILogger
JavaScript
NDatabase.ILogger = function();
NDatabase.ILogger.createInterface('NDatabase.ILogger');
See Also
ILogger Members
NDatabase Namespace
Methods
Name Description
Debug Log message with debug level
See Also
ILogger Interface
NDatabase Namespace
Methods
Name Description
Debug Log message with debug level
See Also
ILogger Interface
NDatabase Namespace
Namespace: NDatabase
Assembly: NDatabase3 (in NDatabase3.dll)
Syntax
Visual Basic
S ub Debug ( _
m essage A s String _
)
C#
void Debug(
string m essage
)
Visual C++
void Debug(
String^ m essage
)
JavaScript
function debug(m essage);
Parameters
message
Type: System.
Mssage to log
See Also
ILogger Interface
NDatabase Namespace
Namespace: NDatabase
Assembly: NDatabase3 (in NDatabase3.dll)
Syntax
Visual Basic
S ub Error ( _
m essage A s String _
)
C#
void Error(
string m essage
)
Visual C++
void Error(
String^ m essage
)
JavaScript
function error(m essage);
Parameters
message
Type: System.
Mssage to log
See Also
ILogger Interface
NDatabase Namespace
Namespace: NDatabase
Assembly: NDatabase3 (in NDatabase3.dll)
Syntax
Visual Basic
S ub Info ( _
m essage A s String _
)
C#
void Info(
string m essage
)
Visual C++
void Info(
String^ m essage
)
JavaScript
function info(m essage);
Parameters
message
Type: System.
Mssage to log
See Also
ILogger Interface
NDatabase Namespace
Namespace: NDatabase
Assembly: NDatabase3 (in NDatabase3.dll)
Syntax
Visual Basic
S ub W arning ( _
m essage A s String _
)
C#
void W arning(
string m essage
)
Visual C++
void W arning(
String^ m essage
)
JavaScript
function warning(m essage);
Parameters
message
Type: System.
Mssage to log
See Also
ILogger Interface
NDatabase Namespace
Namespace: NDatabase
Assembly: NDatabase3 (in NDatabase3.dll)
Syntax
Visual Basic
P ublic N otInheritable C lass O dbFactory
C#
public static class O dbFactory
Visual C++
public ref class O dbFactory abstract sealed
JavaScript
NDatabase.O dbFactory = function();
Type.createClass(
'NDatabase.OdbFactory');
Inheritance Hierarchy
System.
NDatabase.
See Also
OdbFactory Members
NDatabase Namespace
Methods
Name Description
Delete Deletes the specified file name.
Open Opens the database instance with the specified file name.
OpenLast Opens the database instance with the last given name.
See Also
OdbFactory C lass
NDatabase Namespace
Methods
Name Description
Delete Deletes the specified file name.
Open Opens the database instance with the specified file name.
OpenLast Opens the database instance with the last given name.
See Also
OdbFactory C lass
NDatabase Namespace
Namespace: NDatabase
Assembly: NDatabase3 (in NDatabase3.dll)
Syntax
Visual Basic
P ublic S hared S ub Delete ( _
fileNam e A s String _
)
C#
public static void Delete(
string fileNam e
)
Visual C++
public:
static void Delete(
String^ fileNam e
)
JavaScript
NDatabase.O dbFactory.delete = function(fileNam e);
Parameters
fileName
Type: System.
Name of the file.
See Also
OdbFactory C lass
NDatabase Namespace
Namespace: NDatabase
Assembly: NDatabase3 (in NDatabase3.dll)
Syntax
Visual Basic
P ublic S hared Function O pen ( _
fileNam e A s String _
) A s IOdb
C#
public static IOdb O pen(
string fileNam e
)
Visual C++
public:
static IOdb^ O pen(
String^ fileNam e
)
JavaScript
NDatabase.O dbFactory.open = function(fileNam e);
Parameters
fileName
Type: System.
Name of the file.
Return Value
IOdb.
See Also
OdbFactory C lass
NDatabase Namespace
Namespace: NDatabase
Assembly: NDatabase3 (in NDatabase3.dll)
Syntax
Visual Basic
P ublic S hared Function O penInM em ory A s IOdb
C#
public static IOdb O penInM em ory()
Visual C++
public:
static IOdb^ O penInM em ory()
JavaScript
NDatabase.O dbFactory.openInM em ory = function();
Return Value
IOdb implementation.
See Also
OdbFactory C lass
NDatabase Namespace
Namespace: NDatabase
Assembly: NDatabase3 (in NDatabase3.dll)
Syntax
Visual Basic
P ublic S hared Function O penLast A s IOdb
C#
public static IOdb O penLast()
Visual C++
public:
JavaScript
NDatabase.O dbFactory.openLast = function();
Return Value
IOdb.
See Also
OdbFactory C lass
NDatabase Namespace
Namespace: NDatabase
Assembly: NDatabase3 (in NDatabase3.dll)
Syntax
Visual Basic
P ublic N otInheritable C lass O IDFactory
C#
public static class O IDFactory
Visual C++
public ref class O IDFactory abstract sealed
JavaScript
NDatabase.O IDFactory = function();
Type.createClass(
'NDatabase.OIDFactory');
Inheritance Hierarchy
System.
NDatabase.
See Also
OIDFactory Members
NDatabase Namespace
Methods
Name Description
BuildC lassOID Build class oid based on long number
See Also
OIDFactory C lass
NDatabase Namespace
Methods
Name Description
BuildC lassOID Build class oid based on long number
See Also
OIDFactory C lass
NDatabase Namespace
Namespace: NDatabase
Assembly: NDatabase3 (in NDatabase3.dll)
Syntax
Visual Basic
P ublic S hared Function BuildClassO ID ( _
oid A s Long _
) A s OID
C#
public static OID BuildClassO ID(
long oid
)
Visual C++
public:
static OID^ BuildClassO ID(
long long oid
)
JavaScript
NDatabase.O IDFactory.buildClassO ID = function(oid);
Parameters
oid
Type: System.
long number as the base for OID
Return Value
Newly created OID
See Also
OIDFactory C lass
NDatabase Namespace
Namespace: NDatabase
Assembly: NDatabase3 (in NDatabase3.dll)
Syntax
Visual Basic
P ublic S hared Function BuildO bjectO ID ( _
oid A s Long _
) A s OID
C#
public static OID BuildO bjectO ID(
long oid
)
Visual C++
public:
static OID^ BuildO bjectO ID(
long long oid
)
JavaScript
NDatabase.O IDFactory.buildO bjectO ID = function(oid);
Parameters
oid
Type: System.
long number as the base for OID
Return Value
Newly created OID
See Also
OIDFactory C lass
NDatabase Namespace
Classes
Class Description
C ascadeDeleteAttribute Use when you want to do a cascade delete on field object.
OIDAttribute Use when you want to enrich your class with OID. You can apply it on fields of
type:long or OID.
OrderByC onstants Constants used for ordering queries and creating ordered collection iterators
Interfaces
Interface Description
IIndexManager Index Manager - allows to give access to class level configuration like adding an
index, checking if index exists, rebuilding an index,...
IObjectRepresentation used to give the user an instance of an object representation, level2.
Copy Code
ObjectSet
interface serves as a cursor to iterate through a set of objects retrieved by a
query.
IObjectValues Interface that will be implemented to hold a row of a result of an Object Values
Query
IOdb Database engine interface.
IRefactorManager
An interface for refactoring
IValues The main interface of all Object Values query results of NDatabase ODB
Namespace: NDatabase.Api
Assembly: NDatabase3 (in NDatabase3.dll)
Syntax
Visual Basic
<AttributeUsageAttribute(AttributeTargets.Field)> _
P ublic N otInheritable C lass CascadeDeleteAttribute _
Inherits Attribute
C#
[AttributeUsageAttribute(AttributeTargets.Field)]
public sealed class CascadeDeleteAttribute : Attribute
Visual C++
[AttributeUsageAttribute(AttributeTargets::Field)]
public ref class CascadeDeleteAttribute sealed : public Attribute
JavaScript
NDatabase.Api.CascadeDeleteAttribute = function();
Type.createClass(
'NDatabase.Api.CascadeDeleteAttribute',
Attribute);
Remarks
In such case, mark the attribute with
Copy Code
[CascadeDelete]
Inheritance Hierarchy
System.
System.
NDatabase.Api.
See Also
C ascadeDeleteAttribute Members
NDatabase.Api Namespace
Constructors
Name Description
C ascadeDeleteAttribute
Methods
Name Description
Equals (Inherited from Attribute.)
Finalize (Inherited from Object.)
Properties
Name Description
TypeId (Inherited from Attribute.)
See Also
C ascadeDeleteAttribute C lass
NDatabase.Api Namespace
Namespace: NDatabase.Api
Assembly: NDatabase3 (in NDatabase3.dll)
Syntax
Visual Basic
P ublic S ub New
C#
public CascadeDeleteAttribute()
Visual C++
public:
CascadeDeleteAttribute()
JavaScript
NDatabase.Api.CascadeDeleteAttribute = function();
See Also
C ascadeDeleteAttribute C lass
NDatabase.Api Namespace
Methods
Name Description
Equals (Inherited from Attribute.)
Finalize (Inherited from Object.)
See Also
C ascadeDeleteAttribute C lass
NDatabase.Api Namespace
Properties
Name Description
TypeId (Inherited from Attribute.)
See Also
C ascadeDeleteAttribute C lass
NDatabase.Api Namespace
Namespace: NDatabase.Api
Assembly: NDatabase3 (in NDatabase3.dll)
Syntax
Visual Basic
P ublic Interface IDatabaseId
C#
public interface IDatabaseId
Visual C++
public interface class IDatabaseId
JavaScript
NDatabase.Api.IDatabaseId = function();
NDatabase.Api.IDatabaseId.createInterface('NDatabase.Api.IDatabaseId');
See Also
IDatabaseId Members
NDatabase.Api Namespace
Methods
Name Description
See Also
IDatabaseId Interface
NDatabase.Api Namespace
Methods
Name Description
GetIds Long numbers identifing database
See Also
IDatabaseId Interface
NDatabase.Api Namespace
Namespace: NDatabase.Api
Assembly: NDatabase3 (in NDatabase3.dll)
Syntax
Visual Basic
Function GetIds A s Long()
C#
long[] GetIds()
Visual C++
array<long long>^ GetIds()
JavaScript
function getIds();
Return Value
Array of long numbers which identifies the database
See Also
IDatabaseId Interface
NDatabase.Api Namespace
Namespace: NDatabase.Api
Assembly: NDatabase3 (in NDatabase3.dll)
Syntax
Visual Basic
C#
public interface IExternalO ID : OID,
IComparable<OID>, IComparable
Visual C++
public interface class IExternalO ID : OID,
IComparable<OID^>, IComparable
JavaScript
NDatabase.Api.IExternalO ID = function();
NDatabase.Api.IExternalO ID.createInterface('NDatabase.Api.IExternalO ID');
See Also
IExternalOID Members
NDatabase.Api Namespace
Methods
Name Description
C ompareTo(Object) (Inherited from IC omparable.)
C ompareTo(T) (Inherited from IC omparable()
GetDatabaseId Get database id
Properties
Name Description
ObjectId Underlying long number - oid
(Inherited from OID.)
See Also
IExternalOID Interface
NDatabase.Api Namespace
Methods
Name Description
C ompareTo(Object) (Inherited from IC omparable.)
C ompareTo(T) (Inherited from IC omparable()
GetDatabaseId Get database id
See Also
IExternalOID Interface
NDatabase.Api Namespace
Overload List
Name Description
C ompareTo(Object) (Inherited from IC omparable.)
C ompareTo(T) (Inherited from IC omparable()
See Also
IExternalOID Interface
IExternalOID Members
NDatabase.Api Namespace
Get database id
Namespace: NDatabase.Api
Assembly: NDatabase3 (in NDatabase3.dll)
Syntax
Visual Basic
Function GetDatabaseId A s IDatabaseId
C#
IDatabaseId GetDatabaseId()
Visual C++
IDatabaseId^ GetDatabaseId()
JavaScript
function getDatabaseId();
Return Value
Database Id
See Also
IExternalOID Interface
NDatabase.Api Namespace
Properties
Name Description
ObjectId Underlying long number - oid
(Inherited from OID.)
See Also
IExternalOID Interface
NDatabase.Api Namespace
Namespace: NDatabase.Api
Assembly: NDatabase3 (in NDatabase3.dll)
Syntax
Visual Basic
P ublic Interface IIndexM anager
C#
public interface IIndexM anager
Visual C++
public interface class IIndexM anager
JavaScript
NDatabase.Api.IIndexM anager = function();
NDatabase.Api.IIndexM anager.createInterface('NDatabase.Api.IIndexM anager');
See Also
IIndexManager Members
NDatabase.Api Namespace
Methods
Name Description
AddIndexOn
AddUniqueIndexOn
See Also
IIndexManager Interface
NDatabase.Api Namespace
Methods
Name Description
AddIndexOn
AddUniqueIndexOn
See Also
IIndexManager Interface
NDatabase.Api Namespace
Namespace: NDatabase.Api
Assembly: NDatabase3 (in NDatabase3.dll)
Syntax
Visual Basic
S ub AddIndexO n ( _
indexNam e A s String, _
P aram A rray indexFields A s String() _
)
C#
void AddIndexO n(
string indexNam e,
param s string[] indexFields
)
Visual C++
void AddIndexO n(
String^ indexNam e,
... array<String^>^ indexFields
)
JavaScript
function addIndexO n(indexNam e, ... indexFields);
Parameters
indexName
Type: System.
The name of the index
indexFields
Type: .[]
The list of fields of the index. Every field needs to implement IC omparable.
See Also
IIndexManager Interface
NDatabase.Api Namespace
Namespace: NDatabase.Api
Assembly: NDatabase3 (in NDatabase3.dll)
Syntax
Visual Basic
S ub AddUniqueIndexO n ( _
indexNam e A s String, _
C#
void AddUniqueIndexO n(
string indexNam e,
param s string[] indexFields
)
Visual C++
void AddUniqueIndexO n(
String^ indexNam e,
... array<String^>^ indexFields
)
JavaScript
function addUniqueIndexO n(indexNam e, ... indexFields);
Parameters
indexName
Type: System.
The name of the index
indexFields
Type: .[]
The list of fields of the index. Every field needs to implement IC omparable.
See Also
IIndexManager Interface
NDatabase.Api Namespace
Namespace: NDatabase.Api
Assembly: NDatabase3 (in NDatabase3.dll)
Syntax
Visual Basic
S ub DeleteIndex ( _
indexNam e A s String _
)
C#
void DeleteIndex(
string indexNam e
)
Visual C++
void DeleteIndex(
String^ indexNam e
)
JavaScript
function deleteIndex(indexNam e);
Parameters
indexName
Type: System.
Existing index name
See Also
IIndexManager Interface
NDatabase.Api Namespace
Namespace: NDatabase.Api
Assembly: NDatabase3 (in NDatabase3.dll)
Syntax
Visual Basic
Function ExistIndex ( _
indexNam e A s String _
) A s Boolean
C#
bool ExistIndex(
string indexNam e
)
Visual C++
bool ExistIndex(
String^ indexNam e
)
JavaScript
function existIndex(indexNam e);
Parameters
indexName
Type: System.
Existing index name
See Also
IIndexManager Interface
NDatabase.Api Namespace
Namespace: NDatabase.Api
Assembly: NDatabase3 (in NDatabase3.dll)
Syntax
Visual Basic
S ub RebuildIndex ( _
indexNam e A s String _
)
C#
void RebuildIndex(
string indexNam e
)
Visual C++
void RebuildIndex(
String^ indexNam e
)
JavaScript
function rebuildIndex(indexNam e);
Parameters
indexName
Type: System.
Existing index name
See Also
IIndexManager Interface
NDatabase.Api Namespace
Namespace: NDatabase.Api
Assembly: NDatabase3 (in NDatabase3.dll)
Syntax
Visual Basic
P ublic Interface IO bjectRepresentation
C#
public interface IO bjectRepresentation
Visual C++
public interface class IO bjectRepresentation
JavaScript
NDatabase.Api.IO bjectRepresentation = function();
NDatabase.Api.IO bjectRepresentation.createInterface('NDatabase.Api.IO bjectRepresentation');
Remarks
used to give the user an instance of an object representation, level2. The Object Representation encapsulates the
NonNativeObjectInfo which is the internal object representation.
See Also
IObjectRepresentation Members
NDatabase.Api Namespace
Methods
Name Description
See Also
IObjectRepresentation Interface
NDatabase.Api Namespace
Methods
Name Description
GetObjectC lassName Retrieves the full object class name
See Also
IObjectRepresentation Interface
NDatabase.Api Namespace
Namespace: NDatabase.Api
Assembly: NDatabase3 (in NDatabase3.dll)
Syntax
Visual Basic
Function GetO bjectClassNam e A s String
C#
string GetO bjectClassNam e()
Visual C++
String^ GetO bjectClassNam e()
JavaScript
function getO bjectClassNam e();
See Also
IObjectRepresentation Interface
NDatabase.Api Namespace
Namespace: NDatabase.Api
Syntax
Visual Basic
Function GetO id A s OID
C#
OID GetO id()
Visual C++
OID^ GetO id()
JavaScript
function getO id();
See Also
IObjectRepresentation Interface
NDatabase.Api Namespace
Namespace: NDatabase.Api
Assembly: NDatabase3 (in NDatabase3.dll)
Syntax
Visual Basic
Function GetValueO f ( _
attributeNam e A s String _
) A s Object
C#
Object GetValueO f(
string attributeNam e
)
Visual C++
Object^ GetValueO f(
String^ attributeNam e
)
JavaScript
function getValueO f(attributeNam e);
Parameters
attributeName
Type: System.
See Also
IObjectRepresentation Interface
NDatabase.Api Namespace
Namespace: NDatabase.Api
Assembly: NDatabase3 (in NDatabase3.dll)
Syntax
Visual Basic
S ub SetValueO f ( _
attributeNam e A s String, _
value A s Object _
)
C#
void SetValueO f(
string attributeNam e,
Object value
)
Visual C++
void SetValueO f(
String^ attributeNam e,
Object^ value
)
JavaScript
function setValueO f(attributeNam e, value);
Parameters
attributeName
Type: System.
value
Type: System.
See Also
IObjectRepresentation Interface
NDatabase.Api Namespace
Copy Code
ObjectSet
interface serves as a cursor to iterate through a set of objects retrieved by a query.
Namespace: NDatabase.Api
Assembly: NDatabase3 (in NDatabase3.dll)
Syntax
Visual Basic
P ublic Interface IO bjectSet(O f TItem) _
Inherits ICollection(O f TItem), IEnumerable(O f T), _
IEnumerable
C#
public interface IO bjectSet<TItem> : ICollection<TItem>,
IEnumerable<T>, IEnumerable
Visual C++
generic<typenam e TItem>
public interface class IO bjectSet : ICollection<TItem>,
IEnumerable<T>, IEnumerable
JavaScript
JavaScript does not support generic types or m ethods.
Type Parameters
TItem
See Also
IObjectSet()
NDatabase.Api Namespace
The IObjectSet()
Methods
Name Description
Add (Inherited from IC ollection(TItem)
C lear (Inherited from IC ollection(TItem)
C ontains (Inherited from IC ollection(TItem)
C opyTo (Inherited from IC ollection(TItem)
GetEnumerator() (Inherited from IEnumerable(T)
GetEnumerator() (Inherited from IEnumerable.)
GetFirst Return the first object of the collection, if exist
HasNext returns
Copy Code
true
if the
Copy Code
ObjectSet
has more elements.
Next returns the next object in the
Copy Code
ObjectSet
.
Remove (Inherited from IC ollection(TItem)
Reset resets the
Copy Code
ObjectSet
cursor before the first element. A subsequent call to
Copy Code
next()
Properties
Name Description
C ount (Inherited from IC ollection(TItem)
See Also
IObjectSet()
NDatabase.Api Namespace
The IObjectSet()
Methods
Name Description
Add (Inherited from IC ollection(TItem)
C lear (Inherited from IC ollection(TItem)
C ontains (Inherited from IC ollection(TItem)
C opyTo (Inherited from IC ollection(TItem)
GetEnumerator() (Inherited from IEnumerable(T)
GetEnumerator() (Inherited from IEnumerable.)
GetFirst Return the first object of the collection, if exist
HasNext returns
Copy Code
true
if the
Copy Code
ObjectSet
has more elements.
Next returns the next object in the
Copy Code
ObjectSet
.
Remove (Inherited from IC ollection(TItem)
Reset resets the
Copy Code
ObjectSet
cursor before the first element. A subsequent call to
Copy Code
next()
will return the first element.
See Also
IObjectSet()
NDatabase.Api Namespace
Overload List
Name Description
GetEnumerator() (Inherited from IEnumerable(T)
GetEnumerator() (Inherited from IEnumerable.)
See Also
IObjectSet()
IObjectSet()
NDatabase.Api Namespace
Namespace: NDatabase.Api
Assembly: NDatabase3 (in NDatabase3.dll)
Syntax
Visual Basic
Function GetFirst A s TItem
C#
TItem GetFirst()
Visual C++
TItem GetFirst()
JavaScript
function getFirst();
Return Value
See Also
IObjectSet()
NDatabase.Api Namespace
returns
Copy Code
true
if the
Copy Code
ObjectSet
has more elements.
Namespace: NDatabase.Api
Assembly: NDatabase3 (in NDatabase3.dll)
Syntax
Visual Basic
Function HasNext A s Boolean
C#
bool HasNext()
Visual C++
bool HasNext()
JavaScript
function hasNext();
Return Value
Copy Code
true
if the
Copy Code
ObjectSet
has more elements
See Also
IObjectSet()
NDatabase.Api Namespace
Copy Code
ObjectSet
.
Namespace: NDatabase.Api
Assembly: NDatabase3 (in NDatabase3.dll)
Syntax
Visual Basic
Function Next A s TItem
C#
TItem Next()
Visual C++
TItem Next()
JavaScript
function next();
Return Value
the next object in the
Copy Code
ObjectSet
.
See Also
IObjectSet()
NDatabase.Api Namespace
resets the
Copy Code
ObjectSet
cursor before the first element. A subsequent call to
Copy Code
next()
will return the first element.
Namespace: NDatabase.Api
Assembly: NDatabase3 (in NDatabase3.dll)
Syntax
Visual Basic
S ub Reset
C#
void Reset()
Visual C++
void Reset()
JavaScript
function reset();
See Also
IObjectSet()
NDatabase.Api Namespace
The IObjectSet()
Properties
Name Description
C ount (Inherited from IC ollection(TItem)
See Also
IObjectSet()
NDatabase.Api Namespace
Namespace: NDatabase.Api
Assembly: NDatabase3 (in NDatabase3.dll)
Syntax
Visual Basic
P ublic Interface IO bjectValues
C#
public interface IO bjectValues
Visual C++
public interface class IO bjectValues
JavaScript
NDatabase.Api.IO bjectValues = function();
NDatabase.Api.IO bjectValues.createInterface('NDatabase.Api.IO bjectValues');
See Also
IObjectValues Members
NDatabase.Api Namespace
Methods
Name Description
GetByAlias Get result by alias
See Also
IObjectValues Interface
NDatabase.Api Namespace
Methods
Name Description
GetByAlias Get result by alias
See Also
IObjectValues Interface
NDatabase.Api Namespace
Namespace: NDatabase.Api
Assembly: NDatabase3 (in NDatabase3.dll)
Syntax
Visual Basic
Function GetByAlias ( _
alias A s String _
) A s Object
C#
Object GetByAlias(
string alias
)
Visual C++
Object^ GetByAlias(
String^ alias
)
JavaScript
function getByAlias(alias);
Parameters
alias
Type: System.
Alias for result
Return Value
Object result
See Also
IObjectValues Interface
NDatabase.Api Namespace
Namespace: NDatabase.Api
Assembly: NDatabase3 (in NDatabase3.dll)
Syntax
Visual Basic
Function GetByIndex ( _
index A s Integer _
) A s Object
C#
Object GetByIndex(
int index
)
Visual C++
Object^ GetByIndex(
int index
)
JavaScript
function getByIndex(index);
Parameters
index
Type: System.
Index for result
Return Value
Object result
See Also
IObjectValues Interface
NDatabase.Api Namespace
Namespace: NDatabase.Api
Assembly: NDatabase3 (in NDatabase3.dll)
Syntax
Visual Basic
Function GetValues A s Object()
C#
Object[] GetValues()
Visual C++
array<Object^>^ GetValues()
JavaScript
function getValues();
Return Value
Array of objects as values
See Also
IObjectValues Interface
NDatabase.Api Namespace
Namespace: NDatabase.Api
Assembly: NDatabase3 (in NDatabase3.dll)
Syntax
Visual Basic
P ublic Interface IO db _
Inherits IDisposable
C#
public interface IO db : IDisposable
Visual C++
public interface class IO db : IDisposable
JavaScript
NDatabase.Api.IO db = function();
NDatabase.Api.IO db.createInterface('NDatabase.Api.IO db');
Remarks
The interface provides all methods to store, retrieve and delete objects and to change object state.
See Also
IOdb Members
NDatabase.Api Namespace
Methods
Name Description
AsQueryable(T) As the queryable.
QueryAndExecute(T) Queries the database for instances of specified type and execute the query.
ValuesQuery(T)(OID) Factory method to create a new instance of the values query for specified oid.
See Also
IOdb Interface
NDatabase.Api Namespace
Methods
Name Description
AsQueryable(T) As the queryable.
QueryAndExecute(T) Queries the database for instances of specified type and execute the query.
ValuesQuery(T)(OID) Factory method to create a new instance of the values query for specified oid.
See Also
IOdb Interface
NDatabase.Api Namespace
As the queryable.
Namespace: NDatabase.Api
Assembly: NDatabase3 (in NDatabase3.dll)
Syntax
Visual Basic
Function AsQ ueryable(O f T) A s ILinqQueryable(O f T)
C#
ILinqQueryable<T> AsQ ueryable<T>()
Visual C++
generic<typenam e T>
ILinqQueryable<T>^ AsQ ueryable()
JavaScript
JavaScript does not support generic types or m ethods.
Type Parameters
T
Plain object type.
Return Value
Queryable collection
Remarks
Interface for LINQ to NDatabase
See Also
IOdb Interface
NDatabase.Api Namespace
Namespace: NDatabase.Api
Assembly: NDatabase3 (in NDatabase3.dll)
Syntax
Visual Basic
S ub Close
C#
void Close()
Visual C++
void Close()
JavaScript
function close();
Remarks
Automatically commit uncommitted changes of the database.
See Also
IOdb Interface
NDatabase.Api Namespace
Namespace: NDatabase.Api
Assembly: NDatabase3 (in NDatabase3.dll)
Syntax
Visual Basic
S ub Com m it
C#
void Com m it()
Visual C++
void Com m it()
JavaScript
function com m it();
See Also
IOdb Interface
NDatabase.Api Namespace
Namespace: NDatabase.Api
Assembly: NDatabase3 (in NDatabase3.dll)
Syntax
Visual Basic
S ub Defragm entTo ( _
newFileNam e A s String _
)
C#
void Defragm entTo(
string newFileNam e
)
Visual C++
void Defragm entTo(
String^ newFileNam e
)
JavaScript
function defragm entTo(newFileNam e);
Parameters
newFileName
Type: System.
New name of the file.
See Also
IOdb Interface
NDatabase.Api Namespace
Namespace: NDatabase.Api
Assembly: NDatabase3 (in NDatabase3.dll)
Syntax
Visual Basic
Function Delete(O f T A s C lass) ( _
plainO bject A s T _
) A s OID
C#
OID Delete<T>(
T plainO bject
)
w here T : class
Visual C++
generic<typenam e T>
w here T : ref class
OID^ Delete(
T plainO bject
)
JavaScript
JavaScript does not support generic types or m ethods.
Parameters
plainObject
Type: T
The plain object.
Type Parameters
T
Plain object type.
Return Value
Object ID of deleted plain object.
See Also
IOdb Interface
NDatabase.Api Namespace
Namespace: NDatabase.Api
Assembly: NDatabase3 (in NDatabase3.dll)
Syntax
Visual Basic
S ub DeleteO bjectW ithId ( _
oid A s OID _
)
C#
void DeleteO bjectW ithId(
OID oid
)
Visual C++
JavaScript
function deleteO bjectW ithId(oid);
Parameters
oid
Type: NDatabase.Api.
The oid of the object to be deleted.
See Also
IOdb Interface
NDatabase.Api Namespace
Namespace: NDatabase.Api
Assembly: NDatabase3 (in NDatabase3.dll)
Syntax
Visual Basic
S ub Disconnect(O f T A s C lass) ( _
plainO bject A s T _
)
C#
void Disconnect<T>(
T plainO bject
)
w here T : class
Visual C++
generic<typenam e T>
w here T : ref class
void Disconnect(
T plainO bject
)
JavaScript
JavaScript does not support generic types or m ethods.
Parameters
plainObject
Type: T
The plain object.
Type Parameters
T
Plain object type.
Remarks
The object is removed fromthe cache.
See Also
IOdb Interface
NDatabase.Api Namespace
Get the extension of database interface to get the access to advanced functions
Namespace: NDatabase.Api
Assembly: NDatabase3 (in NDatabase3.dll)
Syntax
Visual Basic
Function Ext A s IOdbExt
C#
IOdbExt Ext()
Visual C++
IOdbExt^ Ext()
JavaScript
function ext();
Return Value
Extended interface to database.
See Also
IOdb Interface
NDatabase.Api Namespace
Namespace: NDatabase.Api
Assembly: NDatabase3 (in NDatabase3.dll)
Syntax
Visual Basic
Function GetO bjectFrom Id ( _
id A s OID _
) A s Object
C#
Object GetO bjectFrom Id(
OID id
)
Visual C++
Object^ GetO bjectFrom Id(
OID^ id
)
JavaScript
function getO bjectFrom Id(id);
Parameters
id
Type: NDatabase.Api.
The Object ID.
Return Value
The object with the specified Object ID.
See Also
IOdb Interface
NDatabase.Api Namespace
Namespace: NDatabase.Api
Assembly: NDatabase3 (in NDatabase3.dll)
Syntax
Visual Basic
Function GetO bjectId(O f T A s C lass) ( _
plainO bject A s T _
) A s OID
C#
OID GetO bjectId<T>(
T plainO bject
)
w here T : class
Visual C++
generic<typenam e T>
w here T : ref class
OID^ GetO bjectId(
T plainO bject
)
JavaScript
JavaScript does not support generic types or m ethods.
Parameters
plainObject
Type: T
The plain object.
Type Parameters
T
Plain object type.
Return Value
The database internal Object ID.
See Also
IOdb Interface
NDatabase.Api Namespace
Namespace: NDatabase.Api
Assembly: NDatabase3 (in NDatabase3.dll)
Syntax
Visual Basic
Function GetRefactorM anager A s IRefactorManager
C#
IRefactorManager GetRefactorM anager()
Visual C++
IRefactorManager^ GetRefactorM anager()
JavaScript
function getRefactorM anager();
Return Value
Refactor manager.
Remarks
Refactor manager allows on updating database schema, when classes definition were changed.
See Also
IOdb Interface
NDatabase.Api Namespace
Namespace: NDatabase.Api
Assembly: NDatabase3 (in NDatabase3.dll)
Syntax
Visual Basic
Function IndexM anagerFor(O f T A s C lass) A s IIndexManager
C#
IIndexManager IndexM anagerFor<T>()
w here T : class
Visual C++
generic<typenam e T>
w here T : ref class
IIndexManager^ IndexM anagerFor()
JavaScript
JavaScript does not support generic types or m ethods.
Type Parameters
T
Plain object type.
Return Value
Index manager.
See Also
IOdb Interface
NDatabase.Api Namespace
Namespace: NDatabase.Api
Assembly: NDatabase3 (in NDatabase3.dll)
Syntax
Visual Basic
Function IsClosed A s Boolean
C#
bool IsClosed()
Visual C++
bool IsClosed()
JavaScript
function isClosed();
Return Value
true if the database is closed;otherwise, false.
See Also
IOdb Interface
NDatabase.Api Namespace
Namespace: NDatabase.Api
Assembly: NDatabase3 (in NDatabase3.dll)
Syntax
Visual Basic
Function Q uery(O f T) A s IQuery
C#
IQuery Q uery<T>()
Visual C++
generic<typenam e T>
IQuery^ Q uery()
JavaScript
JavaScript does not support generic types or m ethods.
Type Parameters
T
Plain object type.
Return Value
New instance of query for the specified object type.
See Also
IOdb Interface
NDatabase.Api Namespace
Queries the database for instances of specified type and execute the query.
Namespace: NDatabase.Api
Assembly: NDatabase3 (in NDatabase3.dll)
Syntax
Visual Basic
Function Q ueryAndExecute(O f T) A s IObjectSet(O f T)
C#
IObjectSet<T> Q ueryAndExecute<T>()
Visual C++
generic<typenam e T>
IObjectSet<T>^ Q ueryAndExecute()
JavaScript
JavaScript does not support generic types or m ethods.
Type Parameters
T
Plain object type.
Return Value
List of stored objects that matches the query.
Remarks
Shortcut for
Copy Code
Query<T>().Execute<T>()
See Also
IOdb Interface
NDatabase.Api Namespace
Namespace: NDatabase.Api
Assembly: NDatabase3 (in NDatabase3.dll)
Syntax
Visual Basic
S ub Rollback
C#
void Rollback()
Visual C++
void Rollback()
JavaScript
function rollback();
See Also
IOdb Interface
NDatabase.Api Namespace
Namespace: NDatabase.Api
Assembly: NDatabase3 (in NDatabase3.dll)
Syntax
Visual Basic
Function Store(O f T A s C lass) ( _
plainO bject A s T _
) A s OID
C#
OID Store<T>(
T plainO bject
)
w here T : class
Visual C++
generic<typenam e T>
w here T : ref class
OID^ Store(
T plainO bject
)
JavaScript
JavaScript does not support generic types or m ethods.
Parameters
plainObject
Type: T
The plain object.
Type Parameters
T
Plain object type.
Return Value
Object ID of stored plain object.
See Also
IOdb Interface
NDatabase.Api Namespace
Namespace: NDatabase.Api
Assembly: NDatabase3 (in NDatabase3.dll)
Syntax
Visual Basic
Function TriggerM anagerFor(O f T A s C lass) A s ITriggerManager
C#
ITriggerManager TriggerM anagerFor<T>()
w here T : class
Visual C++
generic<typenam e T>
w here T : ref class
ITriggerManager^ TriggerM anagerFor()
JavaScript
JavaScript does not support generic types or m ethods.
Type Parameters
T
Plain object type.
Return Value
Trigger manager.
See Also
IOdb Interface
NDatabase.Api Namespace
Overload List
Name Description
ValuesQuery(T)() Factory method to create a new instance of the values query.
ValuesQuery(T)(OID) Factory method to create a new instance of the values query for specified oid.
See Also
IOdb Interface
IOdb Members
NDatabase.Api Namespace
Namespace: NDatabase.Api
Assembly: NDatabase3 (in NDatabase3.dll)
Syntax
Visual Basic
C#
IValuesQuery ValuesQ uery<T>()
w here T : class
Visual C++
generic<typenam e T>
w here T : ref class
IValuesQuery^ ValuesQ uery()
JavaScript
JavaScript does not support generic types or m ethods.
Type Parameters
T
Plain object type.
Return Value
New instance of values query for the specified object type.
See Also
IOdb Interface
ValuesQuery Overload
NDatabase.Api Namespace
Factory method to create a new instance of the values query for specified oid.
Namespace: NDatabase.Api
Assembly: NDatabase3 (in NDatabase3.dll)
Syntax
Visual Basic
Function ValuesQ uery(O f T A s C lass) ( _
oid A s OID _
) A s IValuesQuery
C#
IValuesQuery ValuesQ uery<T>(
OID oid
)
w here T : class
Visual C++
generic<typenam e T>
w here T : ref class
IValuesQuery^ ValuesQ uery(
OID^ oid
)
JavaScript
JavaScript does not support generic types or m ethods.
Parameters
oid
Type: NDatabase.Api.
The oid of the stored plain object.
Type Parameters
T
Plain object type.
Return Value
New instance of values query for the specified object with a given oid.
See Also
IOdb Interface
ValuesQuery Overload
NDatabase.Api Namespace
Namespace: NDatabase.Api
Assembly: NDatabase3 (in NDatabase3.dll)
Syntax
Visual Basic
P ublic Interface IO dbCom parable _
Inherits IComparable
C#
public interface IO dbCom parable : IComparable
Visual C++
public interface class IO dbCom parable : IComparable
JavaScript
NDatabase.Api.IO dbCom parable = function();
NDatabase.Api.IO dbCom parable.createInterface('NDatabase.Api.IO dbCom parable');
See Also
IOdbC omparable Members
NDatabase.Api Namespace
Methods
Name Description
C ompareTo (Inherited from IC omparable.)
See Also
IOdbC omparable Interface
NDatabase.Api Namespace
Methods
Name Description
C ompareTo (Inherited from IC omparable.)
See Also
IOdbC omparable Interface
NDatabase.Api Namespace
Namespace: NDatabase.Api
Assembly: NDatabase3 (in NDatabase3.dll)
Syntax
Visual Basic
P ublic Interface IO dbExt
C#
public interface IO dbExt
Visual C++
public interface class IO dbExt
JavaScript
NDatabase.Api.IO dbExt = function();
NDatabase.Api.IO dbExt.createInterface('NDatabase.Api.IO dbExt');
See Also
IOdbExt Members
NDatabase.Api Namespace
Methods
Name Description
C onvertToExternalOID Convert an OID to External OID
GetDatabaseId Get the Database ID
GetDbId Return the name of the database
GetObjectC reationDate Returns the object creation date in ms since 1/1/1970
GetObjectExternalOID(T) Gets the external OID of an Object.
GetObjectUpdateDate Returns the object last update date in ms since 1/1/1970
GetObjectVersion Returns the object version of the object that has the specified OID
See Also
IOdbExt Interface
NDatabase.Api Namespace
Methods
Name Description
C onvertToExternalOID Convert an OID to External OID
GetObjectVersion Returns the object version of the object that has the specified OID
See Also
IOdbExt Interface
NDatabase.Api Namespace
Namespace: NDatabase.Api
Assembly: NDatabase3 (in NDatabase3.dll)
Syntax
Visual Basic
Function ConvertToExternalO ID ( _
oid A s OID _
) A s IExternalOID
C#
IExternalOID ConvertToExternalO ID(
OID oid
)
Visual C++
IExternalOID^ ConvertToExternalO ID(
OID^ oid
)
JavaScript
function convertToExternalO ID(oid);
Parameters
oid
Type: NDatabase.Api.
Return Value
The external OID
See Also
IOdbExt Interface
NDatabase.Api Namespace
Namespace: NDatabase.Api
Assembly: NDatabase3 (in NDatabase3.dll)
Syntax
Visual Basic
Function GetDatabaseId A s IDatabaseId
C#
IDatabaseId GetDatabaseId()
Visual C++
IDatabaseId^ GetDatabaseId()
JavaScript
function getDatabaseId();
See Also
IOdbExt Interface
NDatabase.Api Namespace
Namespace: NDatabase.Api
Assembly: NDatabase3 (in NDatabase3.dll)
Syntax
Visual Basic
Function GetDbId A s String
C#
string GetDbId()
Visual C++
String^ GetDbId()
JavaScript
function getDbId();
Return Value
the file name
See Also
IOdbExt Interface
NDatabase.Api Namespace
Namespace: NDatabase.Api
Assembly: NDatabase3 (in NDatabase3.dll)
Syntax
Visual Basic
Function GetO bjectCreationDate ( _
oid A s OID _
) A s Long
C#
long GetO bjectCreationDate(
OID oid
)
Visual C++
long long GetO bjectCreationDate(
OID^ oid
)
JavaScript
function getO bjectCreationDate(oid);
Parameters
oid
Type: NDatabase.Api.
Return Value
The creation date
See Also
IOdbExt Interface
NDatabase.Api Namespace
Namespace: NDatabase.Api
Assembly: NDatabase3 (in NDatabase3.dll)
Syntax
Visual Basic
Function GetO bjectExternalO ID(O f T A s C lass) ( _
plainO bject A s T _
) A s IExternalOID
C#
IExternalOID GetO bjectExternalO ID<T>(
T plainO bject
)
w here T : class
Visual C++
generic<typenam e T>
w here T : ref class
IExternalOID^ GetO bjectExternalO ID(
T plainO bject
)
JavaScript
JavaScript does not support generic types or m ethods.
Parameters
plainObject
Type: T
Type Parameters
T
Remarks
Gets the external OID of an Object. The external OID contains the ID of the database +the oid of the object. The External
OID can be used to identify objects outside the ODB database as it should be unique across databases. It can be used for
example to implement a replication process.
See Also
IOdbExt Interface
NDatabase.Api Namespace
Namespace: NDatabase.Api
Assembly: NDatabase3 (in NDatabase3.dll)
Syntax
Visual Basic
Function GetO bjectUpdateDate ( _
oid A s OID _
) A s Long
C#
long GetO bjectUpdateDate(
OID oid
)
Visual C++
long long GetO bjectUpdateDate(
OID^ oid
)
JavaScript
function getO bjectUpdateDate(oid);
Parameters
oid
Type: NDatabase.Api.
Return Value
The last update date
See Also
IOdbExt Interface
NDatabase.Api Namespace
Returns the object version of the object that has the specified OID
Namespace: NDatabase.Api
Assembly: NDatabase3 (in NDatabase3.dll)
Syntax
Visual Basic
Function GetO bjectVersion ( _
oid A s OID _
) A s Integer
C#
int GetO bjectVersion(
OID oid
)
Visual C++
int GetO bjectVersion(
OID^ oid
)
JavaScript
function getO bjectVersion(oid);
Parameters
oid
Type: NDatabase.Api.
See Also
IOdbExt Interface
NDatabase.Api Namespace
Namespace: NDatabase.Api
Assembly: NDatabase3 (in NDatabase3.dll)
Syntax
Visual Basic
P ublic Interface IO dbForTrigger _
Inherits IDisposable
C#
public interface IO dbForTrigger : IDisposable
Visual C++
JavaScript
NDatabase.Api.IO dbForTrigger = function();
NDatabase.Api.IO dbForTrigger.createInterface('NDatabase.Api.IO dbForTrigger');
Remarks
The interface provides all methods fromIOdb which are allowed to access in triggers.
See Also
IOdbForTrigger Members
NDatabase.Api Namespace
Methods
Name Description
AsQueryable(T) As the queryable.
QueryAndExecute(T) Queries the database for instances of specified type and execute the query.
ValuesQuery(T)(OID) Factory method to create a new instance of the values query for specified oid.
See Also
IOdbForTrigger Interface
NDatabase.Api Namespace
Methods
Name Description
AsQueryable(T) As the queryable.
Delete(T) Deletes the specified plain object.
DeleteObjectWithId Deletes the object with Object ID.
See Also
IOdbForTrigger Interface
NDatabase.Api Namespace
As the queryable.
Namespace: NDatabase.Api
Assembly: NDatabase3 (in NDatabase3.dll)
Syntax
Visual Basic
Function AsQ ueryable(O f T) A s ILinqQueryable(O f T)
C#
ILinqQueryable<T> AsQ ueryable<T>()
Visual C++
generic<typenam e T>
ILinqQueryable<T>^ AsQ ueryable()
JavaScript
JavaScript does not support generic types or m ethods.
Type Parameters
T
Plain object type.
Return Value
Queryable collection
Remarks
Interface for LINQ to NDatabase
See Also
IOdbForTrigger Interface
NDatabase.Api Namespace
Namespace: NDatabase.Api
Assembly: NDatabase3 (in NDatabase3.dll)
Syntax
Visual Basic
Function Delete(O f T A s C lass) ( _
plainO bject A s T _
) A s OID
C#
OID Delete<T>(
T plainO bject
)
w here T : class
Visual C++
generic<typenam e T>
w here T : ref class
OID^ Delete(
T plainO bject
)
JavaScript
JavaScript does not support generic types or m ethods.
Parameters
plainObject
Type: T
The plain object.
Type Parameters
T
Plain object type.
Return Value
Object ID of deleted plain object.
See Also
IOdbForTrigger Interface
NDatabase.Api Namespace
Namespace: NDatabase.Api
Assembly: NDatabase3 (in NDatabase3.dll)
Syntax
Visual Basic
S ub DeleteO bjectW ithId ( _
oid A s OID _
)
C#
void DeleteO bjectW ithId(
OID oid
)
Visual C++
void DeleteO bjectW ithId(
OID^ oid
)
JavaScript
function deleteO bjectW ithId(oid);
Parameters
oid
Type: NDatabase.Api.
The oid of the object to be deleted.
See Also
IOdbForTrigger Interface
NDatabase.Api Namespace
Get the extension of database interface to get the access to advanced functions
Namespace: NDatabase.Api
Assembly: NDatabase3 (in NDatabase3.dll)
Syntax
Visual Basic
Function Ext A s IOdbExt
C#
IOdbExt Ext()
Visual C++
IOdbExt^ Ext()
JavaScript
function ext();
Return Value
Extended interface to database.
See Also
IOdbForTrigger Interface
NDatabase.Api Namespace
Namespace: NDatabase.Api
Assembly: NDatabase3 (in NDatabase3.dll)
Syntax
Visual Basic
Function GetO bjectFrom Id ( _
id A s OID _
) A s Object
C#
Object GetO bjectFrom Id(
OID id
)
Visual C++
Object^ GetO bjectFrom Id(
OID^ id
)
JavaScript
function getO bjectFrom Id(id);
Parameters
id
Type: NDatabase.Api.
The Object ID.
Return Value
The object with the specified Object ID.
See Also
IOdbForTrigger Interface
NDatabase.Api Namespace
Namespace: NDatabase.Api
Assembly: NDatabase3 (in NDatabase3.dll)
Syntax
Visual Basic
Function GetO bjectId(O f T A s C lass) ( _
plainO bject A s T _
) A s OID
C#
OID GetO bjectId<T>(
T plainO bject
)
w here T : class
Visual C++
generic<typenam e T>
w here T : ref class
OID^ GetO bjectId(
T plainO bject
)
JavaScript
Parameters
plainObject
Type: T
The plain object.
Type Parameters
T
Plain object type.
Return Value
The database internal Object ID.
See Also
IOdbForTrigger Interface
NDatabase.Api Namespace
Namespace: NDatabase.Api
Assembly: NDatabase3 (in NDatabase3.dll)
Syntax
Visual Basic
Function GetValues ( _
query A s IValuesQuery _
) A s IValues
C#
IValues GetValues(
IValuesQuery query
)
Visual C++
IValues^ GetValues(
IValuesQuery^ query
)
JavaScript
function getValues(query);
Parameters
query
Type: NDatabase.Api.Query.
The values query.
Return Value
The list of values that matches the values query.
See Also
IOdbForTrigger Interface
NDatabase.Api Namespace
Namespace: NDatabase.Api
Assembly: NDatabase3 (in NDatabase3.dll)
Syntax
Visual Basic
Function IsClosed A s Boolean
C#
bool IsClosed()
Visual C++
bool IsClosed()
JavaScript
function isClosed();
Return Value
true if the database is closed;otherwise, false.
See Also
IOdbForTrigger Interface
NDatabase.Api Namespace
Namespace: NDatabase.Api
Assembly: NDatabase3 (in NDatabase3.dll)
Syntax
Visual Basic
Function Q uery(O f T) A s IQuery
C#
IQuery Q uery<T>()
Visual C++
generic<typenam e T>
IQuery^ Q uery()
JavaScript
JavaScript does not support generic types or m ethods.
Type Parameters
T
Plain object type.
Return Value
New instance of query for the specified object type.
See Also
IOdbForTrigger Interface
NDatabase.Api Namespace
Queries the database for instances of specified type and execute the query.
Namespace: NDatabase.Api
Assembly: NDatabase3 (in NDatabase3.dll)
Syntax
Visual Basic
Function Q ueryAndExecute(O f T) A s IObjectSet(O f T)
C#
IObjectSet<T> Q ueryAndExecute<T>()
Visual C++
generic<typenam e T>
IObjectSet<T>^ Q ueryAndExecute()
JavaScript
JavaScript does not support generic types or m ethods.
Type Parameters
T
Plain object type.
Return Value
List of stored objects that matches the query.
Remarks
Shortcut for
Copy Code
Query<T>().Execute<T>()
See Also
IOdbForTrigger Interface
NDatabase.Api Namespace
Namespace: NDatabase.Api
Assembly: NDatabase3 (in NDatabase3.dll)
Syntax
Visual Basic
Function Store(O f T A s C lass) ( _
plainO bject A s T _
) A s OID
C#
OID Store<T>(
T plainO bject
)
w here T : class
Visual C++
generic<typenam e T>
w here T : ref class
OID^ Store(
T plainO bject
)
JavaScript
JavaScript does not support generic types or m ethods.
Parameters
plainObject
Type: T
The plain object.
Type Parameters
T
Plain object type.
Return Value
Object ID of stored plain object.
See Also
IOdbForTrigger Interface
NDatabase.Api Namespace
Overload List
Name Description
ValuesQuery(T)() Factory method to create a new instance of the values query.
ValuesQuery(T)(OID) Factory method to create a new instance of the values query for specified oid.
See Also
IOdbForTrigger Interface
IOdbForTrigger Members
NDatabase.Api Namespace
Namespace: NDatabase.Api
Assembly: NDatabase3 (in NDatabase3.dll)
Syntax
Visual Basic
Function ValuesQ uery(O f T A s C lass) A s IValuesQuery
C#
IValuesQuery ValuesQ uery<T>()
w here T : class
Visual C++
generic<typenam e T>
w here T : ref class
IValuesQuery^ ValuesQ uery()
JavaScript
JavaScript does not support generic types or m ethods.
Type Parameters
T
Plain object type.
Return Value
New instance of values query for the specified object type.
See Also
IOdbForTrigger Interface
ValuesQuery Overload
NDatabase.Api Namespace
Factory method to create a new instance of the values query for specified oid.
Namespace: NDatabase.Api
Assembly: NDatabase3 (in NDatabase3.dll)
Syntax
Visual Basic
Function ValuesQ uery(O f T A s C lass) ( _
oid A s OID _
) A s IValuesQuery
C#
IValuesQuery ValuesQ uery<T>(
OID oid
)
w here T : class
Visual C++
generic<typenam e T>
w here T : ref class
IValuesQuery^ ValuesQ uery(
OID^ oid
)
JavaScript
JavaScript does not support generic types or m ethods.
Parameters
oid
Type: NDatabase.Api.
The oid of the stored plain object.
Type Parameters
T
Plain object type.
Return Value
New instance of values query for the specified object with a given oid.
See Also
IOdbForTrigger Interface
ValuesQuery Overload
NDatabase.Api Namespace
Namespace: NDatabase.Api
Assembly: NDatabase3 (in NDatabase3.dll)
Syntax
Visual Basic
P ublic Interface IRefactorM anager
C#
public interface IRefactorM anager
Visual C++
public interface class IRefactorM anager
JavaScript
NDatabase.Api.IRefactorM anager = function();
NDatabase.Api.IRefactorM anager.createInterface('NDatabase.Api.IRefactorM anager');
See Also
IRefactorManager Members
NDatabase.Api Namespace
Methods
Name Description
AddField Extend stored class by new field - refactoring
See Also
IRefactorManager Interface
NDatabase.Api Namespace
Methods
Name Description
See Also
IRefactorManager Interface
NDatabase.Api Namespace
Namespace: NDatabase.Api
Assembly: NDatabase3 (in NDatabase3.dll)
Syntax
Visual Basic
S ub AddField ( _
type A s Type, _
fieldType A s Type, _
fieldNam e A s String _
)
C#
void AddField(
Type type,
Type fieldType,
string fieldNam e
)
Visual C++
void AddField(
Type^ type,
Type^ fieldType,
String^ fieldNam e
)
JavaScript
function addField(type, fieldType, fieldNam e);
Parameters
type
Type: System.
Type of the class
fieldType
Type: System.
New field type
fieldName
Type: System.
New field name
See Also
IRefactorManager Interface
NDatabase.Api Namespace
Namespace: NDatabase.Api
Assembly: NDatabase3 (in NDatabase3.dll)
Syntax
Visual Basic
S ub Rem oveField ( _
type A s Type, _
attributeNam e A s String _
)
C#
void Rem oveField(
Type type,
string attributeNam e
)
Visual C++
void Rem oveField(
Type^ type,
String^ attributeNam e
)
JavaScript
function rem oveField(type, attributeNam e);
Parameters
type
Type: System.
Type of field to remove
attributeName
Type: System.
Name of field to remove
See Also
IRefactorManager Interface
NDatabase.Api Namespace
Namespace: NDatabase.Api
Assembly: NDatabase3 (in NDatabase3.dll)
Syntax
Visual Basic
S ub Renam eClass ( _
fullClassNam e A s String, _
newType A s Type _
)
C#
void Renam eClass(
string fullClassNam e,
Type newType
)
Visual C++
void Renam eClass(
String^ fullClassNam e,
Type^ newType
)
JavaScript
function renam eClass(fullClassNam e, newType);
Parameters
fullClassName
Type: System.
Old class name
newType
Type: System.
New type to apply
See Also
IRefactorManager Interface
NDatabase.Api Namespace
Namespace: NDatabase.Api
Assembly: NDatabase3 (in NDatabase3.dll)
Syntax
Visual Basic
S ub Renam eField ( _
type A s Type, _
attributeNam e A s String, _
newAttributeNam e A s String _
)
C#
void Renam eField(
Type type,
string attributeNam e,
string newAttributeNam e
)
Visual C++
void Renam eField(
Type^ type,
String^ attributeNam e,
String^ newAttributeNam e
)
JavaScript
function renam eField(type, attributeNam e, newAttributeNam e);
Parameters
type
Type: System.
Type of the class
attributeName
Type: System.
Old attribute name
newAttributeName
Type: System.
New attribute name
See Also
IRefactorManager Interface
NDatabase.Api Namespace
Namespace: NDatabase.Api
Assembly: NDatabase3 (in NDatabase3.dll)
Syntax
Visual Basic
P ublic Interface IValues _
Inherits IObjectSet(O f IObjectValues), ICollection(O f IObjectValues), _
IEnumerable(O f IObjectValues), IEnumerable
C#
public interface IValues : IObjectSet<IObjectValues>,
ICollection<IObjectValues>, IEnumerable<IObjectValues>, IEnumerable
Visual C++
public interface class IValues : IObjectSet<IObjectValues^>,
ICollection<IObjectValues^>, IEnumerable<IObjectValues^>, IEnumerable
JavaScript
NDatabase.Api.IValues = function();
NDatabase.Api.IValues.createInterface('NDatabase.Api.IValues');
See Also
IValues Members
NDatabase.Api Namespace
Methods
Name Description
Add (Inherited from IC ollection()
C lear (Inherited from IC ollection()
C ontains (Inherited from IC ollection()
C opyTo (Inherited from IC ollection()
GetEnumerator() (Inherited from IEnumerable()
GetEnumerator() (Inherited from IEnumerable.)
GetFirst Return the first object of the collection, if exist
Copy Code
true
if the
Copy Code
ObjectSet
has more elements.
(Inherited from IObjectSet()
Next returns the next object in the
Copy Code
ObjectSet
.
(Inherited from IObjectSet()
NextValues Get next values set
Remove (Inherited from IC ollection()
Reset resets the
Copy Code
ObjectSet
cursor before the first element. A subsequent call to
Copy Code
next()
will return the first element.
(Inherited from IObjectSet()
Properties
Name Description
C ount (Inherited from IC ollection()
See Also
IValues Interface
NDatabase.Api Namespace
Methods
Name Description
Add (Inherited from IC ollection()
C lear (Inherited from IC ollection()
C ontains (Inherited from IC ollection()
C opyTo (Inherited from IC ollection()
GetEnumerator() (Inherited from IEnumerable()
GetEnumerator() (Inherited from IEnumerable.)
Copy Code
true
if the
Copy Code
ObjectSet
has more elements.
(Inherited from IObjectSet()
Next returns the next object in the
Copy Code
ObjectSet
.
(Inherited from IObjectSet()
NextValues Get next values set
Remove (Inherited from IC ollection()
Reset resets the
Copy Code
ObjectSet
cursor before the first element. A subsequent call to
Copy Code
next()
will return the first element.
(Inherited from IObjectSet()
See Also
IValues Interface
NDatabase.Api Namespace
Overload List
Name Description
GetEnumerator() (Inherited from IEnumerable()
GetEnumerator() (Inherited from IEnumerable.)
See Also
IValues Interface
IValues Members
NDatabase.Api Namespace
Namespace: NDatabase.Api
Assembly: NDatabase3 (in NDatabase3.dll)
Syntax
Visual Basic
Function NextValues A s IObjectValues
C#
IObjectValues NextValues()
Visual C++
IObjectValues^ NextValues()
JavaScript
function nextValues();
Return Value
Next values
See Also
IValues Interface
NDatabase.Api Namespace
Properties
Name Description
C ount (Inherited from IC ollection()
See Also
IValues Interface
NDatabase.Api Namespace
Namespace: NDatabase.Api
Assembly: NDatabase3 (in NDatabase3.dll)
Syntax
Visual Basic
<AttributeUsageAttribute(AttributeTargets.Field)> _
P ublic N otInheritable C lass NonPersistentAttribute _
Inherits Attribute
C#
[AttributeUsageAttribute(AttributeTargets.Field)]
public sealed class NonPersistentAttribute : Attribute
Visual C++
[AttributeUsageAttribute(AttributeTargets::Field)]
public ref class NonPersistentAttribute sealed : public Attribute
JavaScript
NDatabase.Api.NonPersistentAttribute = function();
Type.createClass(
'NDatabase.Api.NonPersistentAttribute',
Attribute);
Remarks
In such case, mark the attribute with
Copy Code
[NonPersistent]
Inheritance Hierarchy
System.
System.
NDatabase.Api.
See Also
NonPersistentAttribute Members
NDatabase.Api Namespace
Constructors
Name Description
NonPersistentAttribute
Methods
Name Description
Equals (Inherited from Attribute.)
Finalize (Inherited from Object.)
Properties
Name Description
TypeId (Inherited from Attribute.)
See Also
NonPersistentAttribute C lass
NDatabase.Api Namespace
Namespace: NDatabase.Api
Assembly: NDatabase3 (in NDatabase3.dll)
Syntax
Visual Basic
P ublic S ub New
C#
public NonPersistentAttribute()
Visual C++
public:
NonPersistentAttribute()
JavaScript
NDatabase.Api.NonPersistentAttribute = function();
See Also
NonPersistentAttribute C lass
NDatabase.Api Namespace
Methods
Name Description
Equals (Inherited from Attribute.)
Finalize (Inherited from Object.)
See Also
NonPersistentAttribute C lass
NDatabase.Api Namespace
Properties
Name Description
TypeId (Inherited from Attribute.)
See Also
NonPersistentAttribute C lass
NDatabase.Api Namespace
Namespace: NDatabase.Api
Assembly: NDatabase3 (in NDatabase3.dll)
Syntax
Visual Basic
P ublic N otInheritable C lass O dbConfiguration
C#
public static class O dbConfiguration
Visual C++
public ref class O dbConfiguration abstract sealed
JavaScript
NDatabase.Api.O dbConfiguration = function();
Type.createClass(
'NDatabase.Api.OdbConfiguration');
Remarks
All engine configuration is done via this class.
Inheritance Hierarchy
System.
NDatabase.Api.
See Also
OdbC onfiguration Members
NDatabase.Api Namespace
Methods
Name Description
DisableBTreeValidation Disables the B tree validation.
Fields
Name Description
DefaultIndexBTreeDegree Default index BTree degree - 20
See Also
OdbC onfiguration C lass
NDatabase.Api Namespace
Fields
Name Description
DefaultIndexBTreeDegree Default index BTree degree - 20
See Also
OdbC onfiguration C lass
NDatabase.Api Namespace
Namespace: NDatabase.Api
Assembly: NDatabase3 (in NDatabase3.dll)
Syntax
Visual Basic
P ublic S hared R eadO nly DefaultIndexBTreeDegree A s Integer
C#
public static readonly int DefaultIndexBTreeDegree
Visual C++
public:
static initonly int DefaultIndexBTreeDegree
JavaScript
NDatabase.Api.O dbConfiguration.defaultIndexBTreeDegree
See Also
OdbC onfiguration C lass
NDatabase.Api Namespace
Methods
Name Description
DisableBTreeValidation Disables the B tree validation.
See Also
OdbC onfiguration C lass
NDatabase.Api Namespace
Namespace: NDatabase.Api
Assembly: NDatabase3 (in NDatabase3.dll)
Syntax
Visual Basic
P ublic S hared S ub DisableBTreeValidation
C#
public static void DisableBTreeValidation()
Visual C++
public:
static void DisableBTreeValidation()
JavaScript
NDatabase.Api.O dbConfiguration.disableBTreeValidation = function();
See Also
OdbC onfiguration C lass
NDatabase.Api Namespace
Namespace: NDatabase.Api
Assembly: NDatabase3 (in NDatabase3.dll)
Syntax
Visual Basic
P ublic S hared S ub DisableLogging
C#
public static void DisableLogging()
Visual C++
public:
static void DisableLogging()
JavaScript
NDatabase.Api.O dbConfiguration.disableLogging = function();
See Also
OdbC onfiguration C lass
NDatabase.Api Namespace
Namespace: NDatabase.Api
Assembly: NDatabase3 (in NDatabase3.dll)
Syntax
Visual Basic
P ublic S hared S ub EnableBTreeValidation
C#
public static void EnableBTreeValidation()
Visual C++
public:
static void EnableBTreeValidation()
JavaScript
NDatabase.Api.O dbConfiguration.enableBTreeValidation = function();
Remarks
It is more safe to run with that (finding issues), but that hits performance.
See Also
OdbC onfiguration C lass
NDatabase.Api Namespace
Namespace: NDatabase.Api
Assembly: NDatabase3 (in NDatabase3.dll)
Syntax
Visual Basic
P ublic S hared S ub EnableLogging
C#
public static void EnableLogging()
Visual C++
public:
static void EnableLogging()
JavaScript
NDatabase.Api.O dbConfiguration.enableLogging = function();
See Also
OdbC onfiguration C lass
NDatabase.Api Namespace
Namespace: NDatabase.Api
Assembly: NDatabase3 (in NDatabase3.dll)
Syntax
Visual Basic
P ublic S hared Function GetIndexBTreeDegree A s Integer
C#
public static int GetIndexBTreeDegree()
Visual C++
public:
static int GetIndexBTreeDegree()
JavaScript
NDatabase.Api.O dbConfiguration.getIndexBTreeDegree = function();
Return Value
Degree of index BTree
Remarks
It is less safe to run without that (finding issues), but that improves performance.
See Also
OdbC onfiguration C lass
NDatabase.Api Namespace
Namespace: NDatabase.Api
Assembly: NDatabase3 (in NDatabase3.dll)
Syntax
Visual Basic
P ublic S hared Function IsBTreeValidationEnabled A s Boolean
C#
public static bool IsBTreeValidationEnabled()
Visual C++
public:
static bool IsBTreeValidationEnabled()
JavaScript
NDatabase.Api.O dbConfiguration.isBTreeValidationEnabled = function();
Return Value
true if [is B tree validation enabled];otherwise, false.
See Also
OdbC onfiguration C lass
NDatabase.Api Namespace
Namespace: NDatabase.Api
Syntax
Visual Basic
P ublic S hared Function IsLoggingEnabled A s Boolean
C#
public static bool IsLoggingEnabled()
Visual C++
public:
static bool IsLoggingEnabled()
JavaScript
NDatabase.Api.O dbConfiguration.isLoggingEnabled = function();
Return Value
true if [is logging enabled];otherwise, false.
See Also
OdbC onfiguration C lass
NDatabase.Api Namespace
Namespace: NDatabase.Api
Assembly: NDatabase3 (in NDatabase3.dll)
Syntax
Visual Basic
P ublic S hared S ub RegisterLogger ( _
logger A s ILogger _
)
C#
public static void RegisterLogger(
ILogger logger
)
Visual C++
public:
static void RegisterLogger(
ILogger^ logger
)
JavaScript
NDatabase.Api.O dbConfiguration.registerLogger = function(logger);
Parameters
logger
Type: NDatabase.
The logger.
Remarks
See Also
OdbC onfiguration C lass
NDatabase.Api Namespace
Namespace: NDatabase.Api
Assembly: NDatabase3 (in NDatabase3.dll)
Syntax
Visual Basic
P ublic S hared S ub SetIndexBTreeDegree ( _
indexBTreeSize A s Integer _
)
C#
public static void SetIndexBTreeDegree(
int indexBTreeSize
)
Visual C++
public:
static void SetIndexBTreeDegree(
int indexBTreeSize
)
JavaScript
NDatabase.Api.O dbConfiguration.setIndexBTreeDegree = function(indexBTreeSize);
Parameters
indexBTreeSize
Type: System.
Size of the index B tree.
Remarks
Default value is equal to 20.
See Also
OdbC onfiguration C lass
NDatabase.Api Namespace
Namespace: NDatabase.Api
Assembly: NDatabase3 (in NDatabase3.dll)
Syntax
Visual Basic
P ublic Interface O ID _
Inherits IComparable(O f O ID ), IComparable
C#
public interface O ID : IComparable<O ID >,
IComparable
Visual C++
public interface class O ID : IComparable<O ID ^>,
IComparable
JavaScript
NDatabase.Api.O ID = function();
NDatabase.Api.O ID.createInterface('NDatabase.Api.O ID');
See Also
OID Members
NDatabase.Api Namespace
Methods
Name Description
C ompareTo(Object) (Inherited from IC omparable.)
C ompareTo(T) (Inherited from IC omparable()
Properties
Name Description
ObjectId Underlying long number - oid
See Also
OID Interface
NDatabase.Api Namespace
Methods
Name Description
C ompareTo(Object) (Inherited from IC omparable.)
C ompareTo(T) (Inherited from IC omparable()
See Also
OID Interface
NDatabase.Api Namespace
Overload List
Name Description
C ompareTo(Object) (Inherited from IC omparable.)
See Also
OID Interface
OID Members
NDatabase.Api Namespace
Properties
Name Description
ObjectId Underlying long number - oid
See Also
OID Interface
NDatabase.Api Namespace
Namespace: NDatabase.Api
Assembly: NDatabase3 (in NDatabase3.dll)
Syntax
Visual Basic
R eadO nly P roperty O bjectId A s Long
G et
C#
long O bjectId { get; }
Visual C++
property long long O bjectId {
long long get ();
}
JavaScript
function get_objectId();
See Also
OID Interface
NDatabase.Api Namespace
Namespace: NDatabase.Api
Assembly: NDatabase3 (in NDatabase3.dll)
Syntax
Visual Basic
<AttributeUsageAttribute(AttributeTargets.Field)> _
P ublic N otInheritable C lass O IDAttribute _
Inherits Attribute
C#
[AttributeUsageAttribute(AttributeTargets.Field)]
public sealed class O IDAttribute : Attribute
Visual C++
[AttributeUsageAttribute(AttributeTargets::Field)]
public ref class O IDAttribute sealed : public Attribute
JavaScript
NDatabase.Api.O IDAttribute = function();
Type.createClass(
'NDatabase.Api.OIDAttribute',
Attribute);
Remarks
In such case, mark the attribute with
Copy Code
[OID]
Inheritance Hierarchy
System.
System.
NDatabase.Api.
See Also
OIDAttribute Members
NDatabase.Api Namespace
Constructors
Name Description
OIDAttribute
Methods
Name Description
Equals (Inherited from Attribute.)
Finalize (Inherited from Object.)
Properties
Name Description
TypeId (Inherited from Attribute.)
See Also
OIDAttribute C lass
NDatabase.Api Namespace
Namespace: NDatabase.Api
Assembly: NDatabase3 (in NDatabase3.dll)
Syntax
Visual Basic
P ublic S ub New
C#
public O IDAttribute()
Visual C++
public:
O IDAttribute()
JavaScript
NDatabase.Api.O IDAttribute = function();
See Also
OIDAttribute C lass
NDatabase.Api Namespace
Methods
Name Description
Equals (Inherited from Attribute.)
Finalize (Inherited from Object.)
See Also
OIDAttribute C lass
NDatabase.Api Namespace
Properties
Name Description
TypeId (Inherited from Attribute.)
See Also
OIDAttribute C lass
NDatabase.Api Namespace
Namespace: NDatabase.Api
Assembly: NDatabase3 (in NDatabase3.dll)
Syntax
Visual Basic
P ublic N otInheritable C lass O rderByConstants
C#
public sealed class O rderByConstants
Visual C++
public ref class O rderByConstants sealed
JavaScript
NDatabase.Api.O rderByConstants = function();
Type.createClass(
'NDatabase.Api.OrderByConstants');
Inheritance Hierarchy
System.
NDatabase.Api.
See Also
OrderByC onstants Members
NDatabase.Api Namespace
Methods
Name Description
Equals (Inherited from Object.)
Finalize (Inherited from Object.)
Fields
Name Description
OrderByAsc Ascending order
OrderByNone No order
See Also
OrderByC onstants C lass
NDatabase.Api Namespace
Fields
Name Description
OrderByAsc Ascending order
OrderByNone No order
See Also
OrderByC onstants C lass
NDatabase.Api Namespace
Ascending order
Namespace: NDatabase.Api
Assembly: NDatabase3 (in NDatabase3.dll)
Syntax
Visual Basic
P ublic S hared R eadO nly O rderByAsc A s OrderByConstants
C#
public static readonly OrderByConstants O rderByAsc
Visual C++
public:
static initonly OrderByConstants^ O rderByAsc
JavaScript
NDatabase.Api.O rderByConstants.orderByAsc
See Also
OrderByC onstants C lass
NDatabase.Api Namespace
Descending order
Namespace: NDatabase.Api
Assembly: NDatabase3 (in NDatabase3.dll)
Syntax
Visual Basic
P ublic S hared R eadO nly O rderByDesc A s OrderByConstants
C#
public static readonly OrderByConstants O rderByDesc
Visual C++
public:
static initonly OrderByConstants^ O rderByDesc
JavaScript
NDatabase.Api.O rderByConstants.orderByDesc
See Also
OrderByC onstants C lass
NDatabase.Api Namespace
No order
Namespace: NDatabase.Api
Assembly: NDatabase3 (in NDatabase3.dll)
Syntax
Visual Basic
P ublic S hared R eadO nly O rderByNone A s OrderByConstants
C#
public static readonly OrderByConstants O rderByNone
Visual C++
public:
static initonly OrderByConstants^ O rderByNone
JavaScript
NDatabase.Api.O rderByConstants.orderByNone
See Also
OrderByC onstants C lass
NDatabase.Api Namespace
Methods
Name Description
Equals (Inherited from Object.)
Finalize (Inherited from Object.)
See Also
OrderByC onstants C lass
NDatabase.Api Namespace
Is ascending order
Namespace: NDatabase.Api
Assembly: NDatabase3 (in NDatabase3.dll)
Syntax
Visual Basic
P ublic Function IsO rderByAsc A s Boolean
C#
public bool IsO rderByAsc()
Visual C++
public:
bool IsO rderByAsc()
JavaScript
function isO rderByAsc();
Return Value
True if ascending, false if not
See Also
OrderByC onstants C lass
NDatabase.Api Namespace
Is descending order
Namespace: NDatabase.Api
Assembly: NDatabase3 (in NDatabase3.dll)
Syntax
Visual Basic
P ublic Function IsO rderByDesc A s Boolean
C#
public bool IsO rderByDesc()
Visual C++
public:
bool IsO rderByDesc()
JavaScript
function isO rderByDesc();
Return Value
True if descending, false if not
See Also
OrderByC onstants C lass
NDatabase.Api Namespace
Is no order set
Namespace: NDatabase.Api
Assembly: NDatabase3 (in NDatabase3.dll)
Syntax
Visual Basic
P ublic Function IsO rderByNone A s Boolean
C#
public bool IsO rderByNone()
Visual C++
public:
bool IsO rderByNone()
JavaScript
function isO rderByNone();
Return Value
True if no order set, false if not
See Also
OrderByC onstants C lass
NDatabase.Api Namespace
Namespace: NDatabase.Api
Assembly: NDatabase3 (in NDatabase3.dll)
Syntax
Visual Basic
P ublic O verrides Function ToString A s String
C#
public override string ToString()
Visual C++
public:
virtual String^ ToString() override
JavaScript
function toString();
See Also
OrderByC onstants C lass
NDatabase.Api Namespace
Interfaces
Interface Description
IC onstraint constraint to limit the objects returned upon query execution. Constraints are
constructed by calling Query.Constrain(). Constraints can be joined with the
methods And() and Or(). The methods to modify the constraint evaluation
algorithmmay be merged, to construct combined evaluation rules. Examples:
Copy Code
Constraint#Smaller().Equal()
for "smaller or equal"
Copy Code
Constraint#Like().Not()
for "not like"
Copy Code
Constraint#Greater().Equal().Not()
for "not greater or equal"
IQuery handle to a node in the query graph. A node in the query graph can represent
multiple classes, one class or an attribute of a class. The graph is automatically
extended with attributes of added constraints (see constrain()) and upon calls
to descend() that request nodes that do not yet exist. References to joined
nodes in the query graph can be obtained by "walking" along the nodes of the
graph with the method descend(). execute() evaluates the entire graph against
all persistent objects. execute() can be called fromany Query node of the
graph. It will return an ObjectSet filled with objects of the class/classes that
the node, it was called from, represents.
IValuesQuery Extending query with additional query metrics.
Copy Code
Constraint#Smaller().Equal()
for "smaller or equal"
Copy Code
Constraint#Like().Not()
for "not like"
Copy Code
Constraint#Greater().Equal().Not()
for "not greater or equal"
Namespace: NDatabase.Api.Query
Assembly: NDatabase3 (in NDatabase3.dll)
Syntax
Visual Basic
P ublic Interface IConstraint
C#
public interface IConstraint
Visual C++
public interface class IConstraint
JavaScript
NDatabase.Api.Q uery.IConstraint = function();
NDatabase.Api.Q uery.IConstraint.createInterface('NDatabase.Api.Q uery.IConstraint');
See Also
IC onstraint Members
NDatabase.Api.Query Namespace
Methods
Name Description
And Links two IConstrains for AND evaluation.
C ontains Sets the evaluation mode to containment comparison. Evaluation is dependant
on the constrained query node:
Copy Code
String
the persistent object is tested to contain a substring.
arrays, collections
the persistent object is tested to contain all elements of the
constraining object.
EndsWith Sets evaluation to string ends with
Equal Sets the evaluation mode to
Copy Code
==
.
GetObject returns the Object the query graph was constrained with to create this
IConstraint.
Greater Sets the evaluation mode to
Copy Code
>
.
Identity Sets the evaluation mode to identity comparison.
InvariantLike Sets the evaluation mode to "like" comparison. (Invariant mode)
Like Sets the evaluation mode to "like" comparison.
Not turns on not() comparison.
Or Links two IConstrains for OR evaluation.
Copy Code
<
.
StartsWith Sets evaluation to string starts with
See Also
IC onstraint Interface
NDatabase.Api.Query Namespace
Methods
Name Description
And Links two IConstrains for AND evaluation.
C ontains Sets the evaluation mode to containment comparison. Evaluation is dependant
on the constrained query node:
Copy Code
String
the persistent object is tested to contain a substring.
arrays, collections
the persistent object is tested to contain all elements of the
constraining object.
EndsWith Sets evaluation to string ends with
Equal Sets the evaluation mode to
Copy Code
==
.
GetObject returns the Object the query graph was constrained with to create this
IConstraint.
Greater Sets the evaluation mode to
Copy Code
>
.
Identity Sets the evaluation mode to identity comparison.
InvariantLike Sets the evaluation mode to "like" comparison. (Invariant mode)
Like Sets the evaluation mode to "like" comparison.
Not turns on not() comparison.
Or Links two IConstrains for OR evaluation.
Copy Code
<
.
StartsWith Sets evaluation to string starts with
See Also
IC onstraint Interface
NDatabase.Api.Query Namespace
Namespace: NDatabase.Api.Query
Assembly: NDatabase3 (in NDatabase3.dll)
Syntax
Visual Basic
Function And ( _
with A s IConstraint _
) A s IConstraint
C#
IConstraint And(
IConstraint with
)
Visual C++
IConstraint^ And(
IConstraint^ with
)
JavaScript
function and(with);
Parameters
with
Type: NDatabase.Api.Query.
The other IC onstraint
Return Value
A new IConstraint, that can be used for further calls to and() and or()
See Also
IC onstraint Interface
NDatabase.Api.Query Namespace
Sets the evaluation mode to containment comparison. Evaluation is dependant on the constrained query node:
Copy Code
String
the persistent object is tested to contain a substring.
arrays, collections
the persistent object is tested to contain all elements of the constraining object.
Namespace: NDatabase.Api.Query
Assembly: NDatabase3 (in NDatabase3.dll)
Syntax
Visual Basic
Function Contains A s IConstraint
C#
IConstraint Contains()
Visual C++
IConstraint^ Contains()
JavaScript
function contains();
Return Value
this IConstraint to allow the chaining of method calls.
See Also
IC onstraint Interface
NDatabase.Api.Query Namespace
Namespace: NDatabase.Api.Query
Assembly: NDatabase3 (in NDatabase3.dll)
Syntax
Visual Basic
Function EndsW ith ( _
isCaseSensitive A s Boolean _
) A s IConstraint
C#
IConstraint EndsW ith(
bool isCaseSensitive
)
Visual C++
IConstraint^ EndsW ith(
bool isCaseSensitive
)
JavaScript
Parameters
isCaseSensitive
Type: System.
Is case sensitive comparison
Return Value
this IConstraint to allow the chaining of method calls.
See Also
IC onstraint Interface
NDatabase.Api.Query Namespace
Copy Code
==
.
Namespace: NDatabase.Api.Query
Assembly: NDatabase3 (in NDatabase3.dll)
Syntax
Visual Basic
Function Equal A s IConstraint
C#
IConstraint Equal()
Visual C++
IConstraint^ Equal()
JavaScript
function equal();
Return Value
this IConstraint to allow the chaining of method calls.
See Also
IC onstraint Interface
NDatabase.Api.Query Namespace
returns the Object the query graph was constrained with to create this IConstraint.
Namespace: NDatabase.Api.Query
Assembly: NDatabase3 (in NDatabase3.dll)
Syntax
Visual Basic
Function GetO bject A s Object
C#
Visual C++
Object^ GetO bject()
JavaScript
function getO bject();
Return Value
The constraining object.
See Also
IC onstraint Interface
NDatabase.Api.Query Namespace
Copy Code
>
.
Namespace: NDatabase.Api.Query
Assembly: NDatabase3 (in NDatabase3.dll)
Syntax
Visual Basic
Function Greater A s IConstraint
C#
IConstraint Greater()
Visual C++
IConstraint^ Greater()
JavaScript
function greater();
Return Value
this IConstraint to allow the chaining of method calls.
See Also
IC onstraint Interface
NDatabase.Api.Query Namespace
Namespace: NDatabase.Api.Query
Assembly: NDatabase3 (in NDatabase3.dll)
Syntax
Visual Basic
Function Identity A s IConstraint
C#
IConstraint Identity()
Visual C++
IConstraint^ Identity()
JavaScript
function identity();
Return Value
this IConstraint to allow the chaining of method calls.
See Also
IC onstraint Interface
NDatabase.Api.Query Namespace
Namespace: NDatabase.Api.Query
Assembly: NDatabase3 (in NDatabase3.dll)
Syntax
Visual Basic
Function InvariantLike A s IConstraint
C#
IConstraint InvariantLike()
Visual C++
IConstraint^ InvariantLike()
JavaScript
function invariantLike();
Return Value
this IConstraint to allow the chaining of method calls.
See Also
IC onstraint Interface
NDatabase.Api.Query Namespace
Namespace: NDatabase.Api.Query
Assembly: NDatabase3 (in NDatabase3.dll)
Syntax
Visual Basic
Function Like A s IConstraint
C#
IConstraint Like()
Visual C++
IConstraint^ Like()
JavaScript
function like();
Return Value
this IConstraint to allow the chaining of method calls.
See Also
IC onstraint Interface
NDatabase.Api.Query Namespace
Namespace: NDatabase.Api.Query
Assembly: NDatabase3 (in NDatabase3.dll)
Syntax
Visual Basic
Function Not A s IConstraint
C#
IConstraint Not()
Visual C++
IConstraint^ Not()
JavaScript
function not();
Return Value
this IConstraint to allow the chaining of method calls.
See Also
IC onstraint Interface
NDatabase.Api.Query Namespace
9.3.1.2.11 Or Method
Namespace: NDatabase.Api.Query
Assembly: NDatabase3 (in NDatabase3.dll)
Syntax
Visual Basic
Function O r ( _
with A s IConstraint _
) A s IConstraint
C#
IConstraint O r(
IConstraint with
)
Visual C++
IConstraint^ O r(
IConstraint^ with
)
JavaScript
function or(with);
Parameters
with
Type: NDatabase.Api.Query.
The other IC onstraint
Return Value
A new IConstraint, that can be used for further calls to and() and or()
See Also
IC onstraint Interface
NDatabase.Api.Query Namespace
Namespace: NDatabase.Api.Query
Assembly: NDatabase3 (in NDatabase3.dll)
Syntax
Visual Basic
Function SizeEq A s IConstraint
C#
IConstraint SizeEq()
Visual C++
IConstraint^ SizeEq()
JavaScript
function sizeEq();
Return Value
this IConstraint to allow the chaining of method calls.
See Also
IC onstraint Interface
NDatabase.Api.Query Namespace
Namespace: NDatabase.Api.Query
Assembly: NDatabase3 (in NDatabase3.dll)
Syntax
Visual Basic
Function SizeGe A s IConstraint
C#
IConstraint SizeGe()
Visual C++
IConstraint^ SizeGe()
JavaScript
function sizeGe();
Return Value
this IConstraint to allow the chaining of method calls.
See Also
IC onstraint Interface
NDatabase.Api.Query Namespace
Namespace: NDatabase.Api.Query
Assembly: NDatabase3 (in NDatabase3.dll)
Syntax
Visual Basic
Function SizeGt A s IConstraint
C#
IConstraint SizeGt()
Visual C++
IConstraint^ SizeGt()
JavaScript
function sizeGt();
Return Value
this IConstraint to allow the chaining of method calls.
See Also
IC onstraint Interface
NDatabase.Api.Query Namespace
Namespace: NDatabase.Api.Query
Assembly: NDatabase3 (in NDatabase3.dll)
Syntax
Visual Basic
Function SizeLe A s IConstraint
C#
IConstraint SizeLe()
Visual C++
IConstraint^ SizeLe()
JavaScript
function sizeLe();
Return Value
this IConstraint to allow the chaining of method calls.
See Also
IC onstraint Interface
NDatabase.Api.Query Namespace
Namespace: NDatabase.Api.Query
Assembly: NDatabase3 (in NDatabase3.dll)
Syntax
Visual Basic
Function SizeLt A s IConstraint
C#
IConstraint SizeLt()
Visual C++
IConstraint^ SizeLt()
JavaScript
function sizeLt();
Return Value
this IConstraint to allow the chaining of method calls.
See Also
IC onstraint Interface
NDatabase.Api.Query Namespace
Namespace: NDatabase.Api.Query
Assembly: NDatabase3 (in NDatabase3.dll)
Syntax
Visual Basic
C#
IConstraint SizeNe()
Visual C++
IConstraint^ SizeNe()
JavaScript
function sizeNe();
Return Value
this IConstraint to allow the chaining of method calls.
See Also
IC onstraint Interface
NDatabase.Api.Query Namespace
Copy Code
<
.
Namespace: NDatabase.Api.Query
Assembly: NDatabase3 (in NDatabase3.dll)
Syntax
Visual Basic
Function Sm aller A s IConstraint
C#
IConstraint Sm aller()
Visual C++
IConstraint^ Sm aller()
JavaScript
function sm aller();
Return Value
this IConstraint to allow the chaining of method calls.
See Also
IC onstraint Interface
NDatabase.Api.Query Namespace
Namespace: NDatabase.Api.Query
Assembly: NDatabase3 (in NDatabase3.dll)
Syntax
Visual Basic
Function StartsW ith ( _
isCaseSensitive A s Boolean _
) A s IConstraint
C#
IConstraint StartsW ith(
bool isCaseSensitive
)
Visual C++
IConstraint^ StartsW ith(
bool isCaseSensitive
)
JavaScript
function startsW ith(isCaseSensitive);
Parameters
isCaseSensitive
Type: System.
Is case sensitive comparison
Return Value
this IConstraint to allow the chaining of method calls.
See Also
IC onstraint Interface
NDatabase.Api.Query Namespace
Namespace: NDatabase.Api.Query
Assembly: NDatabase3 (in NDatabase3.dll)
Syntax
Visual Basic
P ublic Interface ILinqQ uery _
Inherits IEnumerable
C#
public interface ILinqQ uery : IEnumerable
Visual C++
public interface class ILinqQ uery : IEnumerable
JavaScript
NDatabase.Api.Q uery.ILinqQ uery = function();
NDatabase.Api.Q uery.ILinqQ uery.createInterface('NDatabase.Api.Q uery.ILinqQ uery');
See Also
ILinqQuery Members
NDatabase.Api.Query Namespace
Methods
Name Description
GetEnumerator (Inherited from IEnumerable.)
See Also
ILinqQuery Interface
NDatabase.Api.Query Namespace
Methods
Name Description
GetEnumerator (Inherited from IEnumerable.)
See Also
ILinqQuery Interface
NDatabase.Api.Query Namespace
Namespace: NDatabase.Api.Query
Assembly: NDatabase3 (in NDatabase3.dll)
Syntax
Visual Basic
P ublic Interface ILinqQ uery(O f O ut T) _
Inherits ILinqQuery, IEnumerable(O f T), IEnumerable
C#
public interface ILinqQ uery<out T> : ILinqQuery,
IEnumerable<T>, IEnumerable
Visual C++
generic<typenam e T>
public interface class ILinqQ uery : ILinqQuery,
IEnumerable<T>, IEnumerable
JavaScript
JavaScript does not support generic types or m ethods.
Type Parameters
T
See Also
ILinqQuery()
NDatabase.Api.Query Namespace
Methods
Name Description
GetEnumerator() (Inherited from IEnumerable(T)
GetEnumerator() (Inherited from IEnumerable.)
See Also
ILinqQuery()
NDatabase.Api.Query Namespace
Methods
Name Description
GetEnumerator() (Inherited from IEnumerable(T)
GetEnumerator() (Inherited from IEnumerable.)
See Also
ILinqQuery()
NDatabase.Api.Query Namespace
Overload List
Name Description
GetEnumerator() (Inherited from IEnumerable(T)
GetEnumerator() (Inherited from IEnumerable.)
See Also
ILinqQuery()
ILinqQuery()
NDatabase.Api.Query Namespace
Namespace: NDatabase.Api.Query
Assembly: NDatabase3 (in NDatabase3.dll)
Syntax
Visual Basic
P ublic Interface ILinqQ ueryable _
Inherits IOrderedQueryable, IQueryable, IEnumerable
C#
public interface ILinqQ ueryable : IOrderedQueryable,
IQueryable, IEnumerable
Visual C++
JavaScript
NDatabase.Api.Q uery.ILinqQ ueryable = function();
NDatabase.Api.Q uery.ILinqQ ueryable.createInterface('NDatabase.Api.Q uery.ILinqQ ueryable');
See Also
ILinqQueryable Members
NDatabase.Api.Query Namespace
Methods
Name Description
GetEnumerator (Inherited from IEnumerable.)
GetQuery Get underliying linq query
Properties
Name Description
ElementType (Inherited from IQueryable.)
See Also
ILinqQueryable Interface
NDatabase.Api.Query Namespace
Methods
Name Description
GetEnumerator (Inherited from IEnumerable.)
GetQuery Get underliying linq query
See Also
ILinqQueryable Interface
NDatabase.Api.Query Namespace
Namespace: NDatabase.Api.Query
Assembly: NDatabase3 (in NDatabase3.dll)
Syntax
Visual Basic
Function GetQ uery A s ILinqQuery
C#
ILinqQuery GetQ uery()
Visual C++
ILinqQuery^ GetQ uery()
JavaScript
function getQ uery();
Return Value
Linq query
See Also
ILinqQueryable Interface
NDatabase.Api.Query Namespace
Properties
Name Description
ElementType (Inherited from IQueryable.)
See Also
ILinqQueryable Interface
NDatabase.Api.Query Namespace
Namespace: NDatabase.Api.Query
Assembly: NDatabase3 (in NDatabase3.dll)
Syntax
Visual Basic
P ublic Interface ILinqQ ueryable(O f O ut TElement) _
Inherits IOrderedQueryable(O f TElement), IQueryable(O f TElement), _
IEnumerable(O f T), ILinqQueryable, IOrderedQueryable, IQueryable, IEnumerable
C#
public interface ILinqQ ueryable<out TElement> : IOrderedQueryable<TElement>,
IQueryable<TElement>, IEnumerable<T>, ILinqQueryable, IOrderedQueryable,
IQueryable, IEnumerable
Visual C++
generic<typenam e TElement>
JavaScript
JavaScript does not support generic types or m ethods.
Type Parameters
TElement
See Also
ILinqQueryable()
NDatabase.Api.Query Namespace
The ILinqQueryable()
Methods
Name Description
GetEnumerator() (Inherited from IEnumerable(T)
GetEnumerator() (Inherited from IEnumerable.)
GetQuery Get underliying linq query
(Inherited from ILinqQueryable.)
Properties
Name Description
ElementType (Inherited from IQueryable.)
See Also
ILinqQueryable()
NDatabase.Api.Query Namespace
The ILinqQueryable()
Methods
Name Description
GetEnumerator() (Inherited from IEnumerable(T)
GetEnumerator() (Inherited from IEnumerable.)
GetQuery Get underliying linq query
(Inherited from ILinqQueryable.)
See Also
ILinqQueryable()
NDatabase.Api.Query Namespace
Overload List
Name Description
GetEnumerator() (Inherited from IEnumerable(T)
GetEnumerator() (Inherited from IEnumerable.)
See Also
ILinqQueryable()
ILinqQueryable()
NDatabase.Api.Query Namespace
The ILinqQueryable()
Properties
Name Description
ElementType (Inherited from IQueryable.)
See Also
ILinqQueryable()
NDatabase.Api.Query Namespace
Namespace: NDatabase.Api.Query
Assembly: NDatabase3 (in NDatabase3.dll)
Syntax
Visual Basic
P ublic Interface IQ uery
C#
public interface IQ uery
Visual C++
public interface class IQ uery
JavaScript
NDatabase.Api.Q uery.IQ uery = function();
NDatabase.Api.Q uery.IQ uery.createInterface('NDatabase.Api.Q uery.IQ uery');
See Also
IQuery Members
NDatabase.Api.Query Namespace
Methods
Name Description
C onstrain adds a constraint to this node. If the constraint contains attributes that are
not yet present in the query graph, the query graph is extended accordingly.
C ount Return count of filtered elements by defined query
Descend returns a reference to a descendant node in the query graph. If the node does
not exist, it will be created. Query defined class represented in the query node
is tested, whether it contains a field with the specified field name. The
descendant Query node will be created fromall possible candidates.
Execute(T)() executes the Query.
See Also
IQuery Interface
NDatabase.Api.Query Namespace
Methods
Name Description
C onstrain adds a constraint to this node. If the constraint contains attributes that are
not yet present in the query graph, the query graph is extended accordingly.
C ount Return count of filtered elements by defined query
Descend returns a reference to a descendant node in the query graph. If the node does
not exist, it will be created. Query defined class represented in the query node
is tested, whether it contains a field with the specified field name. The
descendant Query node will be created fromall possible candidates.
Execute(T)() executes the Query.
Execute(T)(Boolean) executes the Query.
Execute(T)(Boolean, executes the Query.
Int32, Int32)
OrderAscending adds an ascending ordering criteria to this node of the query graph. Multiple
ordering criteria will be applied in the order they were called. @return this Query
object to allow the chaining of method calls.
OrderDescending adds a descending order criteria to this node of the query graph. Multiple
ordering criteria will be applied in the order they were called. @return this Query
object to allow the chaining of method calls.
See Also
IQuery Interface
NDatabase.Api.Query Namespace
adds a constraint to this node. If the constraint contains attributes that are not yet present in the query graph, the query
graph is extended accordingly.
Namespace: NDatabase.Api.Query
Assembly: NDatabase3 (in NDatabase3.dll)
Syntax
Visual Basic
Function Constrain ( _
value A s Object _
) A s IConstraint
C#
IConstraint Constrain(
Object value
)
Visual C++
IConstraint^ Constrain(
Object^ value
)
JavaScript
function constrain(value);
Parameters
value
Type: System.
constraint the constraint to be added to this Query.
Return Value
Constraint a new Constraint for this query node.
See Also
IQuery Interface
NDatabase.Api.Query Namespace
Namespace: NDatabase.Api.Query
Assembly: NDatabase3 (in NDatabase3.dll)
Syntax
Visual Basic
Function Count A s Long
C#
long Count()
Visual C++
long long Count()
JavaScript
function count();
Return Value
Number of filtered elements.
See Also
IQuery Interface
NDatabase.Api.Query Namespace
returns a reference to a descendant node in the query graph. If the node does not exist, it will be created. Query defined class
represented in the query node is tested, whether it contains a field with the specified field name. The descendant Query node
will be created fromall possible candidates.
Namespace: NDatabase.Api.Query
Assembly: NDatabase3 (in NDatabase3.dll)
Syntax
Visual Basic
Function Descend ( _
attributeNam e A s String _
) A s IQuery
C#
IQuery Descend(
string attributeNam e
)
Visual C++
IQuery^ Descend(
String^ attributeNam e
)
JavaScript
function descend(attributeNam e);
Parameters
attributeName
Type: System.
field path to the descendant.
Return Value
descendant Query node
See Also
IQuery Interface
NDatabase.Api.Query Namespace
Overload List
Name Description
Execute(T)() executes the Query.
See Also
IQuery Interface
IQuery Members
NDatabase.Api.Query Namespace
Namespace: NDatabase.Api.Query
Assembly: NDatabase3 (in NDatabase3.dll)
Syntax
Visual Basic
Function Execute(O f T) A s IObjectSet(O f T)
C#
IObjectSet<T> Execute<T>()
Visual C++
generic<typenam e T>
IObjectSet<T>^ Execute()
JavaScript
JavaScript does not support generic types or m ethods.
Type Parameters
T
Return Value
ObjectSet - the result of the Query.
See Also
IQuery Interface
Execute Overload
NDatabase.Api.Query Namespace
Namespace: NDatabase.Api.Query
Assembly: NDatabase3 (in NDatabase3.dll)
Syntax
Visual Basic
Function Execute(O f T A s C lass) ( _
inM em ory A s Boolean _
) A s IObjectSet(O f T)
C#
IObjectSet<T> Execute<T>(
bool inM em ory
)
w here T : class
Visual C++
generic<typenam e T>
w here T : ref class
IObjectSet<T>^ Execute(
bool inM em ory
)
JavaScript
JavaScript does not support generic types or m ethods.
Parameters
inMemory
Type: System.
Indicates if all returned data should be loaded to memory (inMemory is true) or if the data
should be lazy loaded (inMemory to false)
Type Parameters
T
Return Value
ObjectSet - the result of the Query.
See Also
IQuery Interface
Execute Overload
NDatabase.Api.Query Namespace
Namespace: NDatabase.Api.Query
Assembly: NDatabase3 (in NDatabase3.dll)
Syntax
Visual Basic
Function Execute(O f T A s C lass) ( _
inM em ory A s Boolean, _
startIndex A s Integer, _
endIndex A s Integer _
) A s IObjectSet(O f T)
C#
IObjectSet<T> Execute<T>(
bool inM em ory,
int startIndex,
int endIndex
)
w here T : class
Visual C++
generic<typenam e T>
w here T : ref class
IObjectSet<T>^ Execute(
bool inM em ory,
int startIndex,
int endIndex
)
JavaScript
JavaScript does not support generic types or m ethods.
Parameters
inMemory
Type: System.
Indicates if all returned data should be loaded to memory (inMemory is true) or if the data
should be lazy loaded (inMemory to false)
startIndex
Type: System.
Start index for result page.
endIndex
Type: System.
End index for result page.
Type Parameters
T
Return Value
ObjectSet - the result of the Query.
See Also
IQuery Interface
Execute Overload
NDatabase.Api.Query Namespace
adds an ascending ordering criteria to this node of the query graph. Multiple ordering criteria will be applied in the order they
were called. @return this Query object to allow the chaining of method calls.
Namespace: NDatabase.Api.Query
Assembly: NDatabase3 (in NDatabase3.dll)
Syntax
Visual Basic
Function O rderAscending A s IQuery
C#
IQuery O rderAscending()
Visual C++
IQuery^ O rderAscending()
JavaScript
function orderAscending();
See Also
IQuery Interface
NDatabase.Api.Query Namespace
adds a descending order criteria to this node of the query graph. Multiple ordering criteria will be applied in the order they were
called. @return this Query object to allow the chaining of method calls.
Namespace: NDatabase.Api.Query
Assembly: NDatabase3 (in NDatabase3.dll)
Syntax
Visual Basic
Function O rderDescending A s IQuery
C#
IQuery O rderDescending()
Visual C++
IQuery^ O rderDescending()
JavaScript
function orderDescending();
See Also
IQuery Interface
NDatabase.Api.Query Namespace
Namespace: NDatabase.Api.Query
Assembly: NDatabase3 (in NDatabase3.dll)
Syntax
Visual Basic
P ublic Interface IValuesQ uery _
Inherits IQuery
C#
public interface IValuesQ uery : IQuery
Visual C++
public interface class IValuesQ uery : IQuery
JavaScript
NDatabase.Api.Q uery.IValuesQ uery = function();
NDatabase.Api.Q uery.IValuesQ uery.createInterface('NDatabase.Api.Q uery.IValuesQ uery');
See Also
IValuesQuery Members
NDatabase.Api.Query Namespace
Methods
Name Description
Avg(String) Avgs the specified field name.
Descend returns a reference to a descendant node in the query graph. If the node does
not exist, it will be created. Query defined class represented in the query node
is tested, whether it contains a field with the specified field name. The
descendant Query node will be created fromall possible candidates.
(Inherited from IQuery.)
Execute() Gets the values that matches the values query.
Execute(T)() executes the Query.
(Inherited from IQuery.)
Execute(T)(Boolean) executes the Query.
(Inherited from IQuery.)
Execute(T)(Boolean, executes the Query.
Int32, Int32) (Inherited from IQuery.)
Field(String) Field value for the specified field name.
Field(String, String) Field value for the specified field name.
GroupBy Groups by the specified field list.
Max(String) Max for the specified field name.
Max(String, String) Max for the specified field name.
Min(String) Min for the specified field name.
Min(String, String) Min for the specified field name.
OrderAscending adds an ascending ordering criteria to this node of the query graph. Multiple
ordering criteria will be applied in the order they were called. @return this Query
object to allow the chaining of method calls.
(Inherited from IQuery.)
OrderDescending adds a descending order criteria to this node of the query graph. Multiple
ordering criteria will be applied in the order they were called. @return this Query
object to allow the chaining of method calls.
(Inherited from IQuery.)
SetReturnInstance Enables or disables the return instance option.
Size(String) Size of the specified attribute name (collection or string).
Size(String, String) Size of the specified attribute name (collection or string).
Sublist(String, Int32, Sublists the specified attribute name (collection or string).
Int32)
Sublist(String, Int32, Sublists the specified attribute name (collection or string).
Int32, Boolean)
Sublist(String, String, Sublists the specified attribute name (collection or string).
Int32, Int32)
Sublist(String, String, Sublists the specified attribute name (collection or string).
Int32, Int32, Boolean)
Sum(String) Sums the specified field name.
Sum(String, String) Sums the specified field name.
See Also
IValuesQuery Interface
NDatabase.Api.Query Namespace
Methods
Name Description
Avg(String) Avgs the specified field name.
Avg(String, String) Averages the specified field name.
C onstrain adds a constraint to this node. If the constraint contains attributes that are
not yet present in the query graph, the query graph is extended accordingly.
(Inherited from IQuery.)
C ount() Return count of filtered elements by defined query
(Inherited from IQuery.)
C ount(String) Counts the objects that matches the specified values query.
Descend returns a reference to a descendant node in the query graph. If the node does
not exist, it will be created. Query defined class represented in the query node
is tested, whether it contains a field with the specified field name. The
descendant Query node will be created fromall possible candidates.
(Inherited from IQuery.)
Execute() Gets the values that matches the values query.
Execute(T)() executes the Query.
(Inherited from IQuery.)
Execute(T)(Boolean) executes the Query.
(Inherited from IQuery.)
Execute(T)(Boolean, executes the Query.
Int32, Int32) (Inherited from IQuery.)
Field(String) Field value for the specified field name.
Field(String, String) Field value for the specified field name.
GroupBy Groups by the specified field list.
Max(String) Max for the specified field name.
Max(String, String) Max for the specified field name.
Min(String) Min for the specified field name.
Min(String, String) Min for the specified field name.
OrderAscending adds an ascending ordering criteria to this node of the query graph. Multiple
ordering criteria will be applied in the order they were called. @return this Query
object to allow the chaining of method calls.
(Inherited from IQuery.)
OrderDescending adds a descending order criteria to this node of the query graph. Multiple
ordering criteria will be applied in the order they were called. @return this Query
object to allow the chaining of method calls.
(Inherited from IQuery.)
SetReturnInstance Enables or disables the return instance option.
Size(String) Size of the specified attribute name (collection or string).
Size(String, String) Size of the specified attribute name (collection or string).
Sublist(String, Int32, Sublists the specified attribute name (collection or string).
Int32)
Sublist(String, Int32, Sublists the specified attribute name (collection or string).
Int32, Boolean)
Sublist(String, String, Sublists the specified attribute name (collection or string).
Int32, Int32)
Sublist(String, String, Sublists the specified attribute name (collection or string).
Int32, Int32, Boolean)
Sum(String) Sums the specified field name.
Sum(String, String) Sums the specified field name.
See Also
IValuesQuery Interface
NDatabase.Api.Query Namespace
Overload List
Name Description
Avg(String) Avgs the specified field name.
See Also
IValuesQuery Interface
IValuesQuery Members
NDatabase.Api.Query Namespace
Namespace: NDatabase.Api.Query
Assembly: NDatabase3 (in NDatabase3.dll)
Syntax
Visual Basic
Function Avg ( _
fieldNam e A s String _
) A s IValuesQuery
C#
IValuesQuery Avg(
string fieldNam e
)
Visual C++
IValuesQuery^ Avg(
String^ fieldNam e
)
JavaScript
function avg(fieldNam e);
Parameters
fieldName
Type: System.
Name of the field.
Return Value
Values query with avg value.
See Also
IValuesQuery Interface
Avg Overload
NDatabase.Api.Query Namespace
Namespace: NDatabase.Api.Query
Assembly: NDatabase3 (in NDatabase3.dll)
Syntax
Visual Basic
Function Avg ( _
fieldNam e A s String, _
alias A s String _
) A s IValuesQuery
C#
IValuesQuery Avg(
string fieldNam e,
string alias
)
Visual C++
IValuesQuery^ Avg(
String^ fieldNam e,
String^ alias
)
JavaScript
function avg(fieldNam e, alias);
Parameters
fieldName
Type: System.
Name of the field.
alias
Type: System.
The alias for query value.
Return Value
Values query with alias itemset to avg value.
See Also
IValuesQuery Interface
Avg Overload
NDatabase.Api.Query Namespace
Overload List
Name Description
C ount() Return count of filtered elements by defined query
(Inherited from IQuery.)
C ount(String) Counts the objects that matches the specified values query.
See Also
IValuesQuery Interface
IValuesQuery Members
NDatabase.Api.Query Namespace
Namespace: NDatabase.Api.Query
Assembly: NDatabase3 (in NDatabase3.dll)
Syntax
Visual Basic
Function Count ( _
alias A s String _
) A s IValuesQuery
C#
IValuesQuery Count(
string alias
)
Visual C++
IValuesQuery^ Count(
String^ alias
)
JavaScript
function count(alias);
Parameters
alias
Type: System.
The alias for query value.
Return Value
Values query with alias itemset to count value.
See Also
IValuesQuery Interface
C ount Overload
NDatabase.Api.Query Namespace
Overload List
Name Description
Execute(T)() executes the Query.
(Inherited from IQuery.)
See Also
IValuesQuery Interface
IValuesQuery Members
NDatabase.Api.Query Namespace
Namespace: NDatabase.Api.Query
Assembly: NDatabase3 (in NDatabase3.dll)
Syntax
Visual Basic
Function Execute A s IValues
C#
IValues Execute()
Visual C++
IValues^ Execute()
JavaScript
function execute();
Return Value
The list of values that matches the values query.
See Also
IValuesQuery Interface
Execute Overload
NDatabase.Api.Query Namespace
Overload List
Name Description
Field(String) Field value for the specified field name.
See Also
IValuesQuery Interface
IValuesQuery Members
NDatabase.Api.Query Namespace
Namespace: NDatabase.Api.Query
Assembly: NDatabase3 (in NDatabase3.dll)
Syntax
Visual Basic
Function Field ( _
fieldNam e A s String _
) A s IValuesQuery
C#
IValuesQuery Field(
string fieldNam e
)
Visual C++
IValuesQuery^ Field(
String^ fieldNam e
)
JavaScript
function field(fieldNam e);
Parameters
fieldName
Type: System.
Name of the field.
Return Value
Values query with field value.
See Also
IValuesQuery Interface
Field Overload
NDatabase.Api.Query Namespace
Namespace: NDatabase.Api.Query
Assembly: NDatabase3 (in NDatabase3.dll)
Syntax
Visual Basic
Function Field ( _
fieldNam e A s String, _
alias A s String _
) A s IValuesQuery
C#
IValuesQuery Field(
string fieldNam e,
string alias
)
Visual C++
IValuesQuery^ Field(
String^ fieldNam e,
String^ alias
)
JavaScript
function field(fieldNam e, alias);
Parameters
fieldName
Type: System.
Name of the field.
alias
Type: System.
The alias for query value.
Return Value
Values query with alias itemset to field value.
See Also
IValuesQuery Interface
Field Overload
NDatabase.Api.Query Namespace
Namespace: NDatabase.Api.Query
Assembly: NDatabase3 (in NDatabase3.dll)
Syntax
Visual Basic
Function GroupBy ( _
fieldList A s String _
) A s IValuesQuery
C#
IValuesQuery GroupBy(
string fieldList
)
Visual C++
IValuesQuery^ GroupBy(
String^ fieldList
)
JavaScript
function groupBy(fieldList);
Parameters
fieldList
Type: System.
The fields list.
Return Value
See Also
IValuesQuery Interface
NDatabase.Api.Query Namespace
Overload List
Name Description
Max(String) Max for the specified field name.
See Also
IValuesQuery Interface
IValuesQuery Members
NDatabase.Api.Query Namespace
Namespace: NDatabase.Api.Query
Assembly: NDatabase3 (in NDatabase3.dll)
Syntax
Visual Basic
Function M ax ( _
fieldNam e A s String _
) A s IValuesQuery
C#
IValuesQuery M ax(
string fieldNam e
)
Visual C++
IValuesQuery^ M ax(
String^ fieldNam e
)
JavaScript
function m ax(fieldNam e);
Parameters
fieldName
Type: System.
Name of the field.
Return Value
Values query max value.
See Also
IValuesQuery Interface
Max Overload
NDatabase.Api.Query Namespace
Namespace: NDatabase.Api.Query
Assembly: NDatabase3 (in NDatabase3.dll)
Syntax
Visual Basic
Function M ax ( _
fieldNam e A s String, _
alias A s String _
) A s IValuesQuery
C#
IValuesQuery M ax(
string fieldNam e,
string alias
)
Visual C++
IValuesQuery^ M ax(
String^ fieldNam e,
String^ alias
)
JavaScript
function m ax(fieldNam e, alias);
Parameters
fieldName
Type: System.
Name of the field.
alias
Type: System.
The alias for query value.
Return Value
Values query with alias itemset to max value.
See Also
IValuesQuery Interface
Max Overload
NDatabase.Api.Query Namespace
Overload List
Name Description
Min(String) Min for the specified field name.
See Also
IValuesQuery Interface
IValuesQuery Members
NDatabase.Api.Query Namespace
Namespace: NDatabase.Api.Query
Assembly: NDatabase3 (in NDatabase3.dll)
Syntax
Visual Basic
Function M in ( _
fieldNam e A s String _
) A s IValuesQuery
C#
IValuesQuery M in(
string fieldNam e
)
Visual C++
IValuesQuery^ M in(
String^ fieldNam e
)
JavaScript
function m in(fieldNam e);
Parameters
fieldName
Type: System.
Name of the field.
Return Value
Values query with min value.
See Also
IValuesQuery Interface
Min Overload
NDatabase.Api.Query Namespace
Namespace: NDatabase.Api.Query
Assembly: NDatabase3 (in NDatabase3.dll)
Syntax
Visual Basic
Function M in ( _
fieldNam e A s String, _
alias A s String _
) A s IValuesQuery
C#
IValuesQuery M in(
string fieldNam e,
string alias
)
Visual C++
IValuesQuery^ M in(
String^ fieldNam e,
String^ alias
)
JavaScript
function m in(fieldNam e, alias);
Parameters
fieldName
Type: System.
Name of the field.
alias
Type: System.
The alias for query value.
Return Value
Values query with alias itemset to min value.
See Also
IValuesQuery Interface
Min Overload
NDatabase.Api.Query Namespace
Namespace: NDatabase.Api.Query
Assembly: NDatabase3 (in NDatabase3.dll)
Syntax
Visual Basic
S ub SetReturnInstance ( _
returnInstance A s Boolean _
)
C#
void SetReturnInstance(
bool returnInstance
)
Visual C++
void SetReturnInstance(
bool returnInstance
)
JavaScript
function setReturnInstance(returnInstance);
Parameters
returnInstance
Type: System.
if set to true [return instance].
Remarks
To indicate if query execution must build instances or return object representation, Default value is true(return instance)
See Also
IValuesQuery Interface
NDatabase.Api.Query Namespace
Overload List
Name Description
Size(String) Size of the specified attribute name (collection or string).
See Also
IValuesQuery Interface
IValuesQuery Members
NDatabase.Api.Query Namespace
Namespace: NDatabase.Api.Query
Assembly: NDatabase3 (in NDatabase3.dll)
Syntax
Visual Basic
Function Size ( _
attributeNam e A s String _
) A s IValuesQuery
C#
IValuesQuery Size(
string attributeNam e
)
Visual C++
IValuesQuery^ Size(
String^ attributeNam e
)
JavaScript
function size(attributeNam e);
Parameters
attributeName
Type: System.
Name of the attribute (collection).
Return Value
Values query with size value.
See Also
IValuesQuery Interface
Size Overload
NDatabase.Api.Query Namespace
Namespace: NDatabase.Api.Query
Assembly: NDatabase3 (in NDatabase3.dll)
Syntax
Visual Basic
Function Size ( _
attributeNam e A s String, _
alias A s String _
) A s IValuesQuery
C#
IValuesQuery Size(
string attributeNam e,
string alias
)
Visual C++
IValuesQuery^ Size(
String^ attributeNam e,
String^ alias
)
JavaScript
function size(attributeNam e, alias);
Parameters
attributeName
Type: System.
Name of the attribute (collection).
alias
Type: System.
The alias for query value.
Return Value
Values query with alias itemset to size value.
See Also
IValuesQuery Interface
Size Overload
NDatabase.Api.Query Namespace
Overload List
Name Description
Sublist(String, Int32, Sublists the specified attribute name (collection or string).
Int32)
Sublist(String, Int32, Sublists the specified attribute name (collection or string).
Int32, Boolean)
Sublist(String, String, Sublists the specified attribute name (collection or string).
Int32, Int32)
See Also
IValuesQuery Interface
IValuesQuery Members
NDatabase.Api.Query Namespace
Namespace: NDatabase.Api.Query
Assembly: NDatabase3 (in NDatabase3.dll)
Syntax
Visual Basic
Function Sublist ( _
attributeNam e A s String, _
from Index A s Integer, _
toIndex A s Integer _
) A s IValuesQuery
C#
IValuesQuery Sublist(
string attributeNam e,
int from Index,
int toIndex
)
Visual C++
IValuesQuery^ Sublist(
String^ attributeNam e,
int from Index,
int toIndex
)
JavaScript
function sublist(attributeNam e, from Index, toIndex);
Parameters
attributeName
Type: System.
Name of the attribute (collection or string).
fromIndex
Type: System.
Start index.
toIndex
Type: System.
End index.
Return Value
Values query with sublist value.
See Also
IValuesQuery Interface
Sublist Overload
NDatabase.Api.Query Namespace
Namespace: NDatabase.Api.Query
Assembly: NDatabase3 (in NDatabase3.dll)
Syntax
Visual Basic
Function Sublist ( _
attributeNam e A s String, _
from Index A s Integer, _
size A s Integer, _
throwException A s Boolean _
) A s IValuesQuery
C#
IValuesQuery Sublist(
string attributeNam e,
int from Index,
int size,
bool throwException
)
Visual C++
IValuesQuery^ Sublist(
String^ attributeNam e,
int from Index,
int size,
bool throwException
)
JavaScript
function sublist(attributeNam e, from Index, size, throwException);
Parameters
attributeName
Type: System.
Name of the attribute (collection or string).
fromIndex
Type: System.
Start index.
size
Type: System.
The size.
throwException
Type: System.
if set to true [throws exception].
Return Value
Values query with sublist value.
See Also
IValuesQuery Interface
Sublist Overload
NDatabase.Api.Query Namespace
Namespace: NDatabase.Api.Query
Assembly: NDatabase3 (in NDatabase3.dll)
Syntax
Visual Basic
Function Sublist ( _
attributeNam e A s String, _
alias A s String, _
from Index A s Integer, _
toIndex A s Integer _
) A s IValuesQuery
C#
IValuesQuery Sublist(
string attributeNam e,
string alias,
int from Index,
int toIndex
)
Visual C++
IValuesQuery^ Sublist(
String^ attributeNam e,
String^ alias,
int from Index,
int toIndex
)
JavaScript
function sublist(attributeNam e, alias, from Index, toIndex);
Parameters
attributeName
Type: System.
Name of the attribute (collection or string).
alias
Type: System.
The alias for query value.
fromIndex
Type: System.
Start index.
toIndex
Type: System.
End index.
Return Value
Values query with alias itemset to sublist value.
See Also
IValuesQuery Interface
Sublist Overload
NDatabase.Api.Query Namespace
Namespace: NDatabase.Api.Query
Assembly: NDatabase3 (in NDatabase3.dll)
Syntax
Visual Basic
Function Sublist ( _
attributeNam e A s String, _
alias A s String, _
from Index A s Integer, _
size A s Integer, _
throwException A s Boolean _
) A s IValuesQuery
C#
IValuesQuery Sublist(
string attributeNam e,
string alias,
int from Index,
int size,
bool throwException
)
Visual C++
IValuesQuery^ Sublist(
String^ attributeNam e,
String^ alias,
int from Index,
int size,
bool throwException
)
JavaScript
function sublist(attributeNam e, alias, from Index, size, throwException);
Parameters
attributeName
Type: System.
Name of the attribute (collection or string).
alias
Type: System.
The alias for query value.
fromIndex
Type: System.
Start index.
size
Type: System.
The size.
throwException
Type: System.
if set to true [throws exception].
Return Value
Values query with alias itemset to sublist value.
See Also
IValuesQuery Interface
Sublist Overload
NDatabase.Api.Query Namespace
Overload List
Name Description
Sum(String) Sums the specified field name.
See Also
IValuesQuery Interface
IValuesQuery Members
NDatabase.Api.Query Namespace
Namespace: NDatabase.Api.Query
Assembly: NDatabase3 (in NDatabase3.dll)
Syntax
Visual Basic
Function Sum ( _
fieldNam e A s String _
) A s IValuesQuery
C#
IValuesQuery Sum (
string fieldNam e
)
Visual C++
IValuesQuery^ Sum (
String^ fieldNam e
)
JavaScript
function sum (fieldNam e);
Parameters
fieldName
Type: System.
Name of the field.
Return Value
Values query with sumvalue.
See Also
IValuesQuery Interface
Sum Overload
NDatabase.Api.Query Namespace
Namespace: NDatabase.Api.Query
Assembly: NDatabase3 (in NDatabase3.dll)
Syntax
Visual Basic
Function Sum ( _
fieldNam e A s String, _
alias A s String _
) A s IValuesQuery
C#
IValuesQuery Sum (
string fieldNam e,
string alias
)
Visual C++
IValuesQuery^ Sum (
String^ fieldNam e,
String^ alias
)
JavaScript
function sum (fieldNam e, alias);
Parameters
fieldName
Type: System.
Name of the field.
alias
Type: System.
The alias for query value.
Return Value
Values query with alias itemset to sumvalue.
See Also
IValuesQuery Interface
Sum Overload
NDatabase.Api.Query Namespace
Classes
Class Description
DeleteTrigger Abstract class - derive fromit if you want to create delete trigger
InsertTrigger Abstract class - derive fromit if you want to create insert trigger
SelectTrigger Abstract class - derive fromit if you want to create select trigger
UpdateTrigger Abstract class - derive fromit if you want to create update trigger
Interfaces
Interface Description
ITriggerManager Triggers manager
Namespace: NDatabase.Api.Triggers
Assembly: NDatabase3 (in NDatabase3.dll)
Syntax
Visual Basic
P ublic M ustInherit C lass DeleteTrigger _
Inherits Trigger
C#
public abstract class DeleteTrigger : Trigger
Visual C++
public ref class DeleteTrigger abstract : public Trigger
JavaScript
NDatabase.Api.Triggers.DeleteTrigger = function();
Type.createClass(
'NDatabase.Api.Triggers.DeleteTrigger',
NDatabase.Api.Triggers.Trigger);
Inheritance Hierarchy
System.
NDatabase.Api.Triggers.
NDatabase.Api.Triggers.
See Also
DeleteTrigger Members
NDatabase.Api.Triggers Namespace
Constructors
Name Description
DeleteTrigger
Methods
Name Description
AfterDelete Action which will happen after delete
Properties
Name Description
Odb Access to NDatabase interface connected with created trigger
(Inherited from Trigger.)
See Also
DeleteTrigger C lass
NDatabase.Api.Triggers Namespace
Namespace: NDatabase.Api.Triggers
Assembly: NDatabase3 (in NDatabase3.dll)
Syntax
Visual Basic
P rotected S ub New
C#
protected DeleteTrigger()
Visual C++
protected:
DeleteTrigger()
JavaScript
NDatabase.Api.Triggers.DeleteTrigger = function();
See Also
DeleteTrigger C lass
NDatabase.Api.Triggers Namespace
Methods
Name Description
AfterDelete Action which will happen after delete
BeforeDelete Action which will happen before delete
Equals (Inherited from Object.)
See Also
DeleteTrigger C lass
NDatabase.Api.Triggers Namespace
Namespace: NDatabase.Api.Triggers
Assembly: NDatabase3 (in NDatabase3.dll)
Syntax
Visual Basic
P ublic M ustO verride S ub AfterDelete ( _
object A s Object, _
oid A s OID _
)
C#
public abstract void AfterDelete(
Object object,
OID oid
)
Visual C++
public:
virtual void AfterDelete(
Object^ object,
OID^ oid
) abstract
JavaScript
function afterDelete(object, oid);
Parameters
object
Type: System.
Deleted object
oid
Type: NDatabase.Api.
Oid of deleted object
See Also
DeleteTrigger C lass
NDatabase.Api.Triggers Namespace
Namespace: NDatabase.Api.Triggers
Assembly: NDatabase3 (in NDatabase3.dll)
Syntax
Visual Basic
P ublic M ustO verride Function BeforeDelete ( _
object A s Object, _
oid A s OID _
) A s Boolean
C#
public abstract bool BeforeDelete(
Object object,
OID oid
)
Visual C++
public:
virtual bool BeforeDelete(
Object^ object,
OID^ oid
) abstract
JavaScript
function beforeDelete(object, oid);
Parameters
object
Type: System.
Deleted object
oid
Type: NDatabase.Api.
Oid of deleted object
Return Value
True if object was deleted, false if not
See Also
DeleteTrigger C lass
NDatabase.Api.Triggers Namespace
Properties
Name Description
Odb Access to NDatabase interface connected with created trigger
(Inherited from Trigger.)
See Also
DeleteTrigger C lass
NDatabase.Api.Triggers Namespace
Namespace: NDatabase.Api.Triggers
Assembly: NDatabase3 (in NDatabase3.dll)
Syntax
Visual Basic
P ublic M ustInherit C lass InsertTrigger _
Inherits Trigger
C#
public abstract class InsertTrigger : Trigger
Visual C++
public ref class InsertTrigger abstract : public Trigger
JavaScript
NDatabase.Api.Triggers.InsertTrigger = function();
Type.createClass(
'NDatabase.Api.Triggers.InsertTrigger',
NDatabase.Api.Triggers.Trigger);
Inheritance Hierarchy
System.
NDatabase.Api.Triggers.
NDatabase.Api.Triggers.
See Also
InsertTrigger Members
NDatabase.Api.Triggers Namespace
Constructors
Name Description
InsertTrigger
Methods
Name Description
AfterInsert Action which will happen after insert
BeforeInsert Action which will happen before insert
Equals (Inherited from Object.)
Finalize (Inherited from Object.)
Properties
Name Description
Odb Access to NDatabase interface connected with created trigger
(Inherited from Trigger.)
See Also
InsertTrigger C lass
NDatabase.Api.Triggers Namespace
Namespace: NDatabase.Api.Triggers
Assembly: NDatabase3 (in NDatabase3.dll)
Syntax
Visual Basic
P rotected S ub New
C#
protected InsertTrigger()
Visual C++
protected:
InsertTrigger()
JavaScript
NDatabase.Api.Triggers.InsertTrigger = function();
See Also
InsertTrigger C lass
NDatabase.Api.Triggers Namespace
Methods
Name Description
AfterInsert Action which will happen after insert
See Also
InsertTrigger C lass
NDatabase.Api.Triggers Namespace
Namespace: NDatabase.Api.Triggers
Assembly: NDatabase3 (in NDatabase3.dll)
Syntax
Visual Basic
P ublic M ustO verride S ub AfterInsert ( _
object A s Object, _
oid A s OID _
)
C#
public abstract void AfterInsert(
Object object,
OID oid
)
Visual C++
public:
virtual void AfterInsert(
Object^ object,
OID^ oid
) abstract
JavaScript
function afterInsert(object, oid);
Parameters
object
Type: System.
Inserted object
oid
Type: NDatabase.Api.
Oid of inserted object
See Also
InsertTrigger C lass
NDatabase.Api.Triggers Namespace
Namespace: NDatabase.Api.Triggers
Assembly: NDatabase3 (in NDatabase3.dll)
Syntax
Visual Basic
P ublic M ustO verride Function BeforeInsert ( _
object A s Object _
) A s Boolean
C#
Visual C++
public:
virtual bool BeforeInsert(
Object^ object
) abstract
JavaScript
function beforeInsert(object);
Parameters
object
Type: System.
Inserted object
Return Value
True if object inserted, false in other case
See Also
InsertTrigger C lass
NDatabase.Api.Triggers Namespace
Properties
Name Description
Odb Access to NDatabase interface connected with created trigger
(Inherited from Trigger.)
See Also
InsertTrigger C lass
NDatabase.Api.Triggers Namespace
Namespace: NDatabase.Api.Triggers
Assembly: NDatabase3 (in NDatabase3.dll)
Syntax
Visual Basic
P ublic Interface ITriggerM anager
C#
public interface ITriggerM anager
Visual C++
public interface class ITriggerM anager
JavaScript
NDatabase.Api.Triggers.ITriggerM anager = function();
NDatabase.Api.Triggers.ITriggerM anager.createInterface('NDatabase.Api.Triggers.ITriggerM anager');
See Also
ITriggerManager Members
NDatabase.Api.Triggers Namespace
Methods
Name Description
AddDeleteTrigger USed to add a delete trigger callback for the specific class
AddInsertTrigger Used to add an insert trigger callback for the specific class
AddSelectTrigger Used to add a select trigger callback for the specific class
AddUpdateTrigger Used to add an update trigger callback for the specific class
See Also
ITriggerManager Interface
NDatabase.Api.Triggers Namespace
Methods
Name Description
AddDeleteTrigger USed to add a delete trigger callback for the specific class
AddInsertTrigger Used to add an insert trigger callback for the specific class
AddSelectTrigger Used to add a select trigger callback for the specific class
AddUpdateTrigger Used to add an update trigger callback for the specific class
See Also
ITriggerManager Interface
NDatabase.Api.Triggers Namespace
Namespace: NDatabase.Api.Triggers
Assembly: NDatabase3 (in NDatabase3.dll)
Syntax
Visual Basic
S ub AddDeleteTrigger ( _
trigger A s DeleteTrigger _
)
C#
void AddDeleteTrigger(
DeleteTrigger trigger
)
Visual C++
void AddDeleteTrigger(
DeleteTrigger^ trigger
)
JavaScript
function addDeleteTrigger(trigger);
Parameters
trigger
Type: NDatabase.Api.Triggers.
See Also
ITriggerManager Interface
NDatabase.Api.Triggers Namespace
Namespace: NDatabase.Api.Triggers
Assembly: NDatabase3 (in NDatabase3.dll)
Syntax
Visual Basic
S ub AddInsertTrigger ( _
trigger A s InsertTrigger _
)
C#
void AddInsertTrigger(
InsertTrigger trigger
)
Visual C++
void AddInsertTrigger(
InsertTrigger^ trigger
)
JavaScript
function addInsertTrigger(trigger);
Parameters
trigger
Type: NDatabase.Api.Triggers.
See Also
ITriggerManager Interface
NDatabase.Api.Triggers Namespace
Namespace: NDatabase.Api.Triggers
Assembly: NDatabase3 (in NDatabase3.dll)
Syntax
Visual Basic
S ub AddSelectTrigger ( _
trigger A s SelectTrigger _
)
C#
void AddSelectTrigger(
SelectTrigger trigger
)
Visual C++
void AddSelectTrigger(
SelectTrigger^ trigger
)
JavaScript
function addSelectTrigger(trigger);
Parameters
trigger
Type: NDatabase.Api.Triggers.
See Also
ITriggerManager Interface
NDatabase.Api.Triggers Namespace
Namespace: NDatabase.Api.Triggers
Assembly: NDatabase3 (in NDatabase3.dll)
Syntax
Visual Basic
S ub AddUpdateTrigger ( _
trigger A s UpdateTrigger _
)
C#
void AddUpdateTrigger(
UpdateTrigger trigger
)
Visual C++
void AddUpdateTrigger(
UpdateTrigger^ trigger
)
JavaScript
function addUpdateTrigger(trigger);
Parameters
trigger
Type: NDatabase.Api.Triggers.
See Also
ITriggerManager Interface
NDatabase.Api.Triggers Namespace
Namespace: NDatabase.Api.Triggers
Assembly: NDatabase3 (in NDatabase3.dll)
Syntax
Visual Basic
P ublic M ustInherit C lass SelectTrigger _
Inherits Trigger
C#
public abstract class SelectTrigger : Trigger
Visual C++
public ref class SelectTrigger abstract : public Trigger
JavaScript
NDatabase.Api.Triggers.SelectTrigger = function();
Type.createClass(
'NDatabase.Api.Triggers.SelectTrigger',
NDatabase.Api.Triggers.Trigger);
Inheritance Hierarchy
System.
NDatabase.Api.Triggers.
NDatabase.Api.Triggers.
See Also
SelectTrigger Members
NDatabase.Api.Triggers Namespace
Constructors
Name Description
SelectTrigger
Methods
Name Description
AfterSelect Action which will happen after select
Properties
Name Description
Odb Access to NDatabase interface connected with created trigger
(Inherited from Trigger.)
See Also
SelectTrigger C lass
NDatabase.Api.Triggers Namespace
Namespace: NDatabase.Api.Triggers
Assembly: NDatabase3 (in NDatabase3.dll)
Syntax
Visual Basic
P rotected S ub New
C#
protected SelectTrigger()
Visual C++
protected:
SelectTrigger()
JavaScript
NDatabase.Api.Triggers.SelectTrigger = function();
See Also
SelectTrigger C lass
NDatabase.Api.Triggers Namespace
Methods
Name Description
AfterSelect Action which will happen after select
Equals (Inherited from Object.)
See Also
SelectTrigger C lass
NDatabase.Api.Triggers Namespace
Namespace: NDatabase.Api.Triggers
Assembly: NDatabase3 (in NDatabase3.dll)
Syntax
Visual Basic
P ublic M ustO verride S ub AfterSelect ( _
object A s Object, _
oid A s OID _
)
C#
public abstract void AfterSelect(
Object object,
OID oid
)
Visual C++
public:
virtual void AfterSelect(
Object^ object,
OID^ oid
) abstract
JavaScript
function afterSelect(object, oid);
Parameters
object
Type: System.
Selected object
oid
Type: NDatabase.Api.
OID of selected object
See Also
SelectTrigger C lass
NDatabase.Api.Triggers Namespace
Properties
Name Description
Odb Access to NDatabase interface connected with created trigger
(Inherited from Trigger.)
See Also
SelectTrigger C lass
NDatabase.Api.Triggers Namespace
Namespace: NDatabase.Api.Triggers
Assembly: NDatabase3 (in NDatabase3.dll)
Syntax
Visual Basic
P ublic M ustInherit C lass Trigger
C#
public abstract class Trigger
Visual C++
public ref class Trigger abstract
JavaScript
NDatabase.Api.Triggers.Trigger = function();
Type.createClass(
'NDatabase.Api.Triggers.Trigger');
Inheritance Hierarchy
System.
NDatabase.Api.Triggers.
NDatabase.Api.Triggers.
NDatabase.Api.Triggers.
NDatabase.Api.Triggers.
NDatabase.Api.Triggers.
See Also
Trigger Members
NDatabase.Api.Triggers Namespace
Constructors
Name Description
Trigger
Methods
Name Description
Equals (Inherited from Object.)
Finalize (Inherited from Object.)
Properties
Name Description
Odb Access to NDatabase interface connected with created trigger
See Also
Trigger C lass
NDatabase.Api.Triggers Namespace
Namespace: NDatabase.Api.Triggers
Assembly: NDatabase3 (in NDatabase3.dll)
Syntax
Visual Basic
P rotected S ub New
C#
protected Trigger()
Visual C++
protected:
Trigger()
JavaScript
NDatabase.Api.Triggers.Trigger = function();
See Also
Trigger C lass
NDatabase.Api.Triggers Namespace
Methods
Name Description
Equals (Inherited from Object.)
See Also
Trigger C lass
NDatabase.Api.Triggers Namespace
Properties
Name Description
Odb Access to NDatabase interface connected with created trigger
See Also
Trigger C lass
NDatabase.Api.Triggers Namespace
Namespace: NDatabase.Api.Triggers
Assembly: NDatabase3 (in NDatabase3.dll)
Syntax
Visual Basic
P ublic P roperty O db A s IOdbForTrigger
G et
Friend S et
C#
public IOdbForTrigger O db { get; internal set; }
Visual C++
public:
property IOdbForTrigger^ O db {
IOdbForTrigger^ get ();
internal: void set (IOdbForTrigger^ value);
}
JavaScript
function get_odb();
function set_odb(value);
See Also
Trigger C lass
NDatabase.Api.Triggers Namespace
Namespace: NDatabase.Api.Triggers
Assembly: NDatabase3 (in NDatabase3.dll)
Syntax
Visual Basic
P ublic M ustInherit C lass UpdateTrigger _
Inherits Trigger
C#
public abstract class UpdateTrigger : Trigger
Visual C++
public ref class UpdateTrigger abstract : public Trigger
JavaScript
NDatabase.Api.Triggers.UpdateTrigger = function();
Type.createClass(
'NDatabase.Api.Triggers.UpdateTrigger',
NDatabase.Api.Triggers.Trigger);
Inheritance Hierarchy
System.
NDatabase.Api.Triggers.
NDatabase.Api.Triggers.
See Also
UpdateTrigger Members
NDatabase.Api.Triggers Namespace
Constructors
Name Description
UpdateTrigger
Methods
Name Description
AfterUpdate Action which will happen after update
BeforeUpdate Action which will happen before update
Equals (Inherited from Object.)
Finalize (Inherited from Object.)
Properties
Name Description
Odb Access to NDatabase interface connected with created trigger
(Inherited from Trigger.)
See Also
UpdateTrigger C lass
NDatabase.Api.Triggers Namespace
Namespace: NDatabase.Api.Triggers
Assembly: NDatabase3 (in NDatabase3.dll)
Syntax
Visual Basic
P rotected S ub New
C#
protected UpdateTrigger()
Visual C++
protected:
UpdateTrigger()
JavaScript
NDatabase.Api.Triggers.UpdateTrigger = function();
See Also
UpdateTrigger C lass
NDatabase.Api.Triggers Namespace
Methods
Name Description
AfterUpdate Action which will happen after update
See Also
UpdateTrigger C lass
NDatabase.Api.Triggers Namespace
Namespace: NDatabase.Api.Triggers
Assembly: NDatabase3 (in NDatabase3.dll)
Syntax
Visual Basic
P ublic M ustO verride S ub AfterUpdate ( _
oldO bjectRepresentation A s IObjectRepresentation, _
newO bject A s Object, _
oid A s OID _
)
C#
public abstract void AfterUpdate(
IObjectRepresentation oldO bjectRepresentation,
Object newO bject,
OID oid
)
Visual C++
public:
virtual void AfterUpdate(
IObjectRepresentation^ oldO bjectRepresentation,
Object^ newO bject,
OID^ oid
) abstract
JavaScript
function afterUpdate(oldO bjectRepresentation, newO bject, oid);
Parameters
oldObjectRepresentation
Type: NDatabase.Api.
Object representation
newObject
Type: System.
Updated object
oid
Type: NDatabase.Api.
Oid of updated object
See Also
UpdateTrigger C lass
NDatabase.Api.Triggers Namespace
Namespace: NDatabase.Api.Triggers
Assembly: NDatabase3 (in NDatabase3.dll)
Syntax
Visual Basic
C#
public abstract bool BeforeUpdate(
IObjectRepresentation oldO bjectRepresentation,
Object newO bject,
OID oid
)
Visual C++
public:
virtual bool BeforeUpdate(
IObjectRepresentation^ oldO bjectRepresentation,
Object^ newO bject,
OID^ oid
) abstract
JavaScript
function beforeUpdate(oldO bjectRepresentation, newO bject, oid);
Parameters
oldObjectRepresentation
Type: NDatabase.Api.
Object representation
newObject
Type: System.
Updated object
oid
Type: NDatabase.Api.
Oid of updated object
Return Value
True if updated, in other case false
See Also
UpdateTrigger C lass
NDatabase.Api.Triggers Namespace
Properties
Name Description
Odb Access to NDatabase interface connected with created trigger
(Inherited from Trigger.)
See Also
UpdateTrigger C lass
NDatabase.Api.Triggers Namespace
Classes
Class Description
BTreeException Exception raised when error in BTrees will appear
BTreeNodeValidationExce Exception raised when error in BTrees will appear (validation error)
ption
C orruptedDatabaseExcept An exception thrown by ODB when a corrupted block is found
ion
DuplicatedKeyException Exception raised when error in BTrees will appear (Duplicated key)
Namespace: NDatabase.Exceptions
Assembly: NDatabase3 (in NDatabase3.dll)
Syntax
Visual Basic
P ublic C lass BTreeException _
Inherits OdbRuntimeException
C#
public class BTreeException : OdbRuntimeException
Visual C++
public ref class BTreeException : public OdbRuntimeException
JavaScript
NDatabase.Exceptions.BTreeException = function();
Type.createClass(
'NDatabase.Exceptions.BTreeException',
NDatabase.Exceptions.OdbRuntimeException);
Inheritance Hierarchy
System.
System.
NDatabase.Exceptions.
NDatabase.Exceptions.
NDatabase.Exceptions.
See Also
BTreeException Members
NDatabase.Exceptions Namespace
Methods
Name Description
Equals (Inherited from Object.)
Finalize (Inherited from Object.)
Properties
Name Description
Data (Inherited from Exception.)
See Also
BTreeException C lass
NDatabase.Exceptions Namespace
Methods
Name Description
Equals (Inherited from Object.)
Finalize (Inherited from Object.)
See Also
BTreeException C lass
NDatabase.Exceptions Namespace
Properties
Name Description
Data (Inherited from Exception.)
See Also
BTreeException C lass
NDatabase.Exceptions Namespace
Namespace: NDatabase.Exceptions
Assembly: NDatabase3 (in NDatabase3.dll)
Syntax
Visual Basic
P ublic N otInheritable C lass BTreeNodeValidationException _
Inherits OdbRuntimeException
C#
public sealed class BTreeNodeValidationException : OdbRuntimeException
Visual C++
public ref class BTreeNodeValidationException sealed : public OdbRuntimeException
JavaScript
NDatabase.Exceptions.BTreeNodeValidationException = function();
Type.createClass(
'NDatabase.Exceptions.BTreeNodeValidationException',
NDatabase.Exceptions.OdbRuntimeException);
Inheritance Hierarchy
System.
System.
NDatabase.Exceptions.
NDatabase.Exceptions.
See Also
BTreeNodeValidationException Members
NDatabase.Exceptions Namespace
Methods
Name Description
Equals (Inherited from Object.)
Finalize (Inherited from Object.)
Properties
Name Description
Data (Inherited from Exception.)
See Also
BTreeNodeValidationException C lass
NDatabase.Exceptions Namespace
Methods
Name Description
Equals (Inherited from Object.)
Finalize (Inherited from Object.)
See Also
BTreeNodeValidationException C lass
NDatabase.Exceptions Namespace
Properties
Name Description
Data (Inherited from Exception.)
See Also
BTreeNodeValidationException C lass
NDatabase.Exceptions Namespace
Namespace: NDatabase.Exceptions
Assembly: NDatabase3 (in NDatabase3.dll)
Syntax
Visual Basic
P ublic N otInheritable C lass CorruptedDatabaseException _
Inherits OdbRuntimeException
C#
public sealed class CorruptedDatabaseException : OdbRuntimeException
Visual C++
public ref class CorruptedDatabaseException sealed : public OdbRuntimeException
JavaScript
NDatabase.Exceptions.CorruptedDatabaseException = function();
Type.createClass(
'NDatabase.Exceptions.CorruptedDatabaseException',
NDatabase.Exceptions.OdbRuntimeException);
Inheritance Hierarchy
System.
System.
NDatabase.Exceptions.
NDatabase.Exceptions.
See Also
C orruptedDatabaseException Members
NDatabase.Exceptions Namespace
Methods
Name Description
Equals (Inherited from Object.)
Finalize (Inherited from Object.)
Properties
Name Description
Data (Inherited from Exception.)
See Also
C orruptedDatabaseException C lass
NDatabase.Exceptions Namespace
Methods
Name Description
Equals (Inherited from Object.)
Finalize (Inherited from Object.)
See Also
C orruptedDatabaseException C lass
NDatabase.Exceptions Namespace
Properties
Name Description
Data (Inherited from Exception.)
See Also
C orruptedDatabaseException C lass
NDatabase.Exceptions Namespace
Namespace: NDatabase.Exceptions
Assembly: NDatabase3 (in NDatabase3.dll)
Syntax
Visual Basic
P ublic N otInheritable C lass DuplicatedKeyException _
Inherits BTreeException
C#
public sealed class DuplicatedKeyException : BTreeException
Visual C++
public ref class DuplicatedKeyException sealed : public BTreeException
JavaScript
NDatabase.Exceptions.DuplicatedKeyException = function();
Type.createClass(
'NDatabase.Exceptions.DuplicatedKeyException',
NDatabase.Exceptions.BTreeException);
Inheritance Hierarchy
System.
System.
NDatabase.Exceptions.
NDatabase.Exceptions.
NDatabase.Exceptions.
See Also
DuplicatedKeyException Members
NDatabase.Exceptions Namespace
Methods
Name Description
Equals (Inherited from Object.)
Finalize (Inherited from Object.)
Properties
Name Description
Data (Inherited from Exception.)
See Also
DuplicatedKeyException C lass
NDatabase.Exceptions Namespace
Methods
Name Description
Equals (Inherited from Object.)
Finalize (Inherited from Object.)
See Also
DuplicatedKeyException C lass
NDatabase.Exceptions Namespace
Properties
Name Description
Data (Inherited from Exception.)
See Also
DuplicatedKeyException C lass
NDatabase.Exceptions Namespace
Namespace: NDatabase.Exceptions
Assembly: NDatabase3 (in NDatabase3.dll)
Syntax
Visual Basic
P ublic N otInheritable C lass LinqQ ueryException _
Inherits OdbRuntimeException
C#
public sealed class LinqQ ueryException : OdbRuntimeException
Visual C++
public ref class LinqQ ueryException sealed : public OdbRuntimeException
JavaScript
NDatabase.Exceptions.LinqQ ueryException = function();
Type.createClass(
'NDatabase.Exceptions.LinqQueryException',
NDatabase.Exceptions.OdbRuntimeException);
Inheritance Hierarchy
System.
System.
NDatabase.Exceptions.
NDatabase.Exceptions.
See Also
LinqQueryException Members
NDatabase.Exceptions Namespace
Methods
Name Description
Equals (Inherited from Object.)
Finalize (Inherited from Object.)
Properties
Name Description
Data (Inherited from Exception.)
See Also
LinqQueryException C lass
NDatabase.Exceptions Namespace
Methods
Name Description
Equals (Inherited from Object.)
Finalize (Inherited from Object.)
See Also
LinqQueryException C lass
NDatabase.Exceptions Namespace
Properties
Name Description
Data (Inherited from Exception.)
See Also
LinqQueryException C lass
NDatabase.Exceptions Namespace
Namespace: NDatabase.Exceptions
Assembly: NDatabase3 (in NDatabase3.dll)
Syntax
Visual Basic
P ublic C lass O dbRuntim eException _
Inherits Exception
C#
public class O dbRuntim eException : Exception
Visual C++
public ref class O dbRuntim eException : public Exception
JavaScript
NDatabase.Exceptions.O dbRuntim eException = function();
Type.createClass(
'NDatabase.Exceptions.OdbRuntimeException',
Exception);
Inheritance Hierarchy
System.
System.
NDatabase.Exceptions.
NDatabase.Exceptions.
NDatabase.Exceptions.
NDatabase.Exceptions.
NDatabase.Exceptions.
See Also
OdbRuntimeException Members
NDatabase.Exceptions Namespace
Methods
Name Description
Properties
Name Description
Data (Inherited from Exception.)
See Also
OdbRuntimeException C lass
NDatabase.Exceptions Namespace
Methods
Name Description
Equals (Inherited from Object.)
Finalize (Inherited from Object.)
See Also
OdbRuntimeException C lass
NDatabase.Exceptions Namespace
Properties
Name Description
Data (Inherited from Exception.)
See Also
OdbRuntimeException C lass
NDatabase.Exceptions Namespace