From 54e7db229474bab6df51094222e74b6960b218af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nora=20Dimitrijevi=C4=87?= Date: Thu, 14 Nov 2024 14:54:44 +0100 Subject: [PATCH 1/2] BigInt GA: s/arbitrary-precision/arbitrary-range/g in .rst docs --- docs/codeql/ql-language-reference/modules.rst | 2 +- docs/codeql/ql-language-reference/ql-language-specification.rst | 2 +- docs/codeql/ql-language-reference/types.rst | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/codeql/ql-language-reference/modules.rst b/docs/codeql/ql-language-reference/modules.rst index 75b61667246e..b7a353b8ccb0 100644 --- a/docs/codeql/ql-language-reference/modules.rst +++ b/docs/codeql/ql-language-reference/modules.rst @@ -431,7 +431,7 @@ The above query therefore evalutes to: BigInt ====== -The built-in ``QlBuiltins`` module provides an **experimental** type ``BigInt`` of arbitrary-precision integers. +The built-in ``QlBuiltins`` module provides an **experimental** type ``BigInt`` of arbitrary-range integers. 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. Consequently, BigInts are currently disallowed in query results and dbscheme columns. diff --git a/docs/codeql/ql-language-reference/ql-language-specification.rst b/docs/codeql/ql-language-reference/ql-language-specification.rst index 60e5ece73303..4c8fd30076a8 100644 --- a/docs/codeql/ql-language-reference/ql-language-specification.rst +++ b/docs/codeql/ql-language-reference/ql-language-specification.rst @@ -445,7 +445,7 @@ An integer value is of type ``int``. Each value is a 32-bit two's complement int A string is a finite sequence of 16-bit characters. The characters are interpreted as Unicode code points. -A :ref:`big integer ` value is of type ``QlBuiltins::BigInt``. Each value is a signed arbitrary-precision integer. +A :ref:`big integer ` value is of type ``QlBuiltins::BigInt``. Each value is a signed arbitrary-range integer. 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. diff --git a/docs/codeql/ql-language-reference/types.rst b/docs/codeql/ql-language-reference/types.rst index e14f542dcf88..caafc0396229 100644 --- a/docs/codeql/ql-language-reference/types.rst +++ b/docs/codeql/ql-language-reference/types.rst @@ -52,7 +52,7 @@ independent of the database that you are querying. 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 section on `built-ins `__ in the QL language specification. -Additionally, there is an experimental arbitrary-precision integer primitive type at :ref:`QlBuiltins::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. +Additionally, there is an experimental arbitrary-range integer primitive type at :ref:`QlBuiltins::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. .. index:: class .. _classes: From 2da1d6aaa8aa2fa67e640e7e7627c33aee4f70ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nora=20Dimitrijevi=C4=87?= Date: Thu, 14 Nov 2024 15:16:13 +0100 Subject: [PATCH 2/2] BigInt GA: remove mention of experimental status from .rst docs --- docs/codeql/ql-language-reference/modules.rst | 7 +++---- docs/codeql/ql-language-reference/types.rst | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/docs/codeql/ql-language-reference/modules.rst b/docs/codeql/ql-language-reference/modules.rst index b7a353b8ccb0..d0cbdd39e36d 100644 --- a/docs/codeql/ql-language-reference/modules.rst +++ b/docs/codeql/ql-language-reference/modules.rst @@ -431,10 +431,7 @@ The above query therefore evalutes to: BigInt ====== -The built-in ``QlBuiltins`` module provides an **experimental** type ``BigInt`` of arbitrary-range integers. - -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. Consequently, BigInts are currently disallowed in query results and dbscheme columns. +The built-in ``QlBuiltins`` module provides a type ``BigInt`` of arbitrary-range integers. Unlike ``int`` and ``float``, there is no automatic conversion between ``BigInt`` and other numeric types. Instead, big integers can be constructed using the ``.toBigInt()`` methods of ``int`` and ``string``. @@ -451,3 +448,5 @@ The other built-in operations are: ``rank``, ``unique``, ``any``. * other: ``.pow(int)``, ``.abs()``, ``.gcd(BigInt)``, ``.minimum(BigInt)``, ``.maximum(BigInt)``. + +Note: big integers are currently disallowed in query results and dbscheme columns. diff --git a/docs/codeql/ql-language-reference/types.rst b/docs/codeql/ql-language-reference/types.rst index caafc0396229..d2d79fe8409b 100644 --- a/docs/codeql/ql-language-reference/types.rst +++ b/docs/codeql/ql-language-reference/types.rst @@ -52,7 +52,7 @@ independent of the database that you are querying. 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 section on `built-ins `__ in the QL language specification. -Additionally, there is an experimental arbitrary-range integer primitive type at :ref:`QlBuiltins::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. +Additionally, there is an arbitrary-range integer primitive type at :ref:`QlBuiltins::BigInt `. .. index:: class .. _classes: