*** DRAFT ***
The UINT Collating Sequence

1. Overview

The UINT collating sequences is a loadable extension for SQLite that implements a new collating sequence that compares text containing unsigned integers in numeric order.

The UINT collating sequence is not a standard part of SQLite. It must be loaded as a separate extension. The source code to UINT is in the uint.c source file in the ext/misc/ folder of the SQLite source tree.

The UINT collating sequence is not included in standard builds of the SQLite library, but it is loaded by default in the CLI. This is typical of the CLI which loads various extensions above and beyond what are available in the standard SQLite library.

The UINT collating sequence works just like the default BINARY collating sequence for text, except that embedded strings of digits compare in numeric order.

2. Example:

COLLATE binaryCOLLATE uint
'0000123457'
'123456'
'abc0000000010xyz'
'abc0010xyy'
'abc10xzz'
'abc674xyz'
'abc87xyz'
'abc9xyz'
'123456'
'0000123457'
'abc9xyz'
'abc0010xyy'
'abc0000000010xyz'
'abc10xzz'
'abc87xyz'
'abc674xyz'

This page last modified on 2022-01-08 05:02:57 UTC

*** DRAFT ***