You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/codeql/ql-language-reference/ql-language-specification.rst
+5-3Lines changed: 5 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -359,7 +359,7 @@ Kinds of types
359
359
360
360
Types in QL are either *primitive* types, *database* types, *class* types, *character* types, *class domain* types, type *parameters*, or *instantiation-nested* types.
361
361
362
-
The primitive types are ``boolean``, ``date``, ``float``, ``int``, and ``string``.
362
+
The primitive types are ``boolean``, ``date``, ``float``, ``int``, ``string``, and ``QlBuiltins::BigInt``.
363
363
364
364
Database types are supplied as part of the database. Each database type has a *name*, which is an identifier starting with an at sign (``@``, U+0040) followed by lower-case letter. Database types have some number of *base types*, which are other database types. In a valid database, the base types relation is non-cyclic.
365
365
@@ -433,7 +433,7 @@ Values are the fundamental data that QL programs compute over. This section spec
433
433
Kinds of values
434
434
~~~~~~~~~~~~~~~
435
435
436
-
There are six kinds of values in QL: one kind for each of the five primitive types, and *entities*. Each value has a type.
436
+
There are seven kinds of values in QL: one kind for each of the six primitive types, and *entities*. Each value has a type.
437
437
438
438
A boolean value is of type ``boolean``, and may have one of two distinct values: ``true`` or ``false``.
439
439
@@ -445,6 +445,8 @@ An integer value is of type ``int``. Each value is a 32-bit two's complement int
445
445
446
446
A string is a finite sequence of 16-bit characters. The characters are interpreted as Unicode code points.
447
447
448
+
A :ref:`big integer <bigint>` value is of type ``QlBuiltins::BigInt``. Each value is a signed arbitrary-precision integer.
449
+
448
450
The database includes a number of opaque entity values. Each such value has a type that is one of the database types, and an identifying integer. An entity value is written as the name of its database type followed by its identifying integer in parentheses. For example, ``@tree(12)``, ``@person(16)``, and ``@location(38132)`` are entity values. The identifying integers are left opaque to programmers in this specification, so an implementation of QL is free to use some other set of countable labels to identify its entities.
449
451
450
452
Ordering
@@ -458,7 +460,7 @@ For dates, the ordering is chronological.
458
460
459
461
For floats, the ordering is as specified in IEEE 754 when one exists, except that NaN is considered equal to itself and is ordered after all other floats, and negative zero is considered to be strictly less than positive zero.
460
462
461
-
For integers, the ordering is as for two's complement integers.
463
+
For integers (and :ref:`big integers <bigint>`), the ordering is numerical.
Copy file name to clipboardExpand all lines: docs/codeql/ql-language-reference/types.rst
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -52,6 +52,8 @@ independent of the database that you are querying.
52
52
QL has a range of built-in operations defined on primitive types. These are available by using dispatch on expressions of the appropriate type. For example, ``1.toString()`` is the string representation of the integer constant ``1``. For a full list of built-in operations available in QL, see the
53
53
section on `built-ins <https://codeql.github.com/docs/ql-language-reference/ql-language-specification/#built-ins>`__ in the QL language specification.
54
54
55
+
Additionally, there is an experimental arbitrary-precision integer primitive type at :ref:`QlBuiltins::BigInt <bigint>`. This type is not available in the CodeQL CLI by default, but you can enable it by passing the ``--allow-experimental=bigint`` option to the CodeQL CLI.
0 commit comments