Data Model
Overview
The adapter dynamically retrieves notes associated with forms and views and models them as tables and views.
Note: The forms and views exposed by the adapter are limited to those exposed in the schema governed by the scope specified in DatabaseScope.
Tables
The adapter models forms with the dql mode enabled as tables. Query tables to retrieve notes associated with those forms.
Note: You must set TableTypes to Forms to discover and query forms.
Available tables are listed by querying the "sys_tables" system table.
For example:
SELECT * FROM sys_tables WHERE TableName = 'Person'
Views
The adapter models views as views. Query views to retrieve notes associated with those views.
Note: You must set TableTypes to Views to discover and query views.
Available views are listed by querying the "sys_tables" system table.
For example:
SELECT * FROM sys_tables WHERE TableName = '($Account)'
Columns
Available columns for tables and views are listed by querying the "sys_tablecolumns" system table.For example:
SELECT * FROM sys_tablecolumns WHERE TableName = 'Person'
Stored Procedures
Stored procedures allow you to execute function-like operations to .
For example, attachments can be manipulated via the DownloadAttachment, UploadAttachment, and RemoveAttachment stored procedures.
Note Metadata
In addition to the items defined on each note, exposes unid, a unique note identifier, which identifies this specific note across all databases on the server. This is available in all tables and views.
Metadata Display Configuration
The adapter supports options for controlling how tables, views, and columns are named:
By default, UseDisplayNames is set to true, and the adapter uses column labels as the names for view columns. If UseDisplayNames is set to false, the adapter displays the internal names of view columns.
If UseSimpleNames is enabled, the adapter enforces a naming scheme where only alphanumeric characters and the underscores are displayed in the table and column names. Any nonalphanumeric characters are converted to an underscore.
Null Values
does not have a direct equivalent of the SQL NULL value. The adapter reports NULL values for columns in these scenarios:
- When an item is not set on a note. In formulas, this is equivalent to @IsAvailable(item) = 0.
- When a single-valued item on a note is the empty text value. In formulas, this is equivalent to @IsNull(item) = 1. Here, a single-valued item is an item on the base table or view where the adapter did not find any multi-value entries during type detection.