DuplicateCompare Field

Collapse All Expand All Code: All Code: Multiple Code: C# Code: Visual Basic Code: Visual C++

C#
Visual Basic
Visual C++

Berkeley DB .NET API Documentation
SecondaryBTreeDatabaseConfig..::.DuplicateCompare Field
SecondaryBTreeDatabaseConfig Class See Also

The duplicate data item comparison function.

Namespace: BerkeleyDB
Assembly: libdb_dotnet48 (in libdb_dotnet48.dll) Version: 4.8.24.0

# Syntax

C#
    public EntryComparisonDelegate DuplicateCompare

Visual Basic (Declaration)
    Public DuplicateCompare As EntryComparisonDelegate

Visual C++
    public:
    EntryComparisonDelegate^ DuplicateCompare

# Remarks

The comparison function is called whenever it is necessary to compare a data item specified by the application with a data item currently stored in the database. Setting DuplicateCompare implies setting Duplicates to SORTED.

If no comparison function is specified, the data items are compared lexically, with shorter data items collating before longer data items.

If the database already exists when Open(String, SecondaryBTreeDatabaseConfig) is called, the delegate must be the same as that historically used to create the database or corruption can occur.

# See Also

SecondaryBTreeDatabaseConfig Class
BerkeleyDB Namespace