AllowNulls: Boolean;
AllowNulls: boolean;
The AllowNulls property determines whether empty values are allowed in the index.
The property is relevant only for the repositories using the DBMS MS SQL Server.
Available values:
True. Index allows empty values.
False. Index does not allow empty values.
Executing the example requires that the repository contains a table with the "T" identifier. Add links to the Metabase, Db system assemblies.
Sub UserProc;
Var
MB: IMetabase;
Table: ITable;
Inds: ITableIndexes;
i: Integer;
Index: ITableIndex;
s: String;
Begin
MB := MetabaseClass.Active;
Table := MB.ItemById("T").Bind As ITable;
Inds := Table.Indexes;
For i := 0 To Inds.Count - 1 Do
Index := Inds.Item(i);
s := Index;
s := s + Index.Id + "' ";
If Index.AllowNulls Then
s := s + allows empty values;
Else
s := s + does not allow empty values;
End If;
Debug.WriteLine(s);
End For;
End Sub UserProc;
After executing the example the data of table indexes is displayed in the console window, whether indexes are allowed to contain null values.
Executing the example requires that the repository contains a table with the "T" identifier.
Imports Prognoz.Platform.Interop.Db;
…
[STAThread]
Public Shared Sub Main(Params: StartParams);
Var
MB: IMetabase;
Table: ITable;
Inds: ITableIndexes;
i: Integer;
Index: ITableIndex;
s: String;
Begin
MB := Params.Metabase;
Table := MB.ItemById["T"].Bind() As ITable;
Inds := Table.Indexes;
For i := 0 To Inds.Count - 1 Do
Index := Inds.Item[i];
s := Index;
s := s + Index.Id + "' ";
If Index.AllowNulls Then
s := s + allows null values;
Else
s := s + does not allow null values;
End If;
System.Diagnostics.Debug.WriteLine(s);
End For;
End Sub;
After executing the example the data of table indexes is displayed in the console window, whether indexes are allowed to contain null values.
See also: