Skip to content

Version Number

Type Registry

Version Number

technology.development.version

Software or document version in semantic versioning format (e.g., 1.2.3) or variant formats (e.g., v1.2.3, 1.2.3-alpha, 1.2.3+build). Resolves to VARCHAR.

Domain technologydevelopment
Casts to VARCHAR
Scope Universal

Try it

CLI
$ finetype infer -i "1.2.3"
→ technology.development.version

DuckDB

Detect
SELECT finetype('1.2.3');
-- → 'technology.development.version'
Cast expression
CAST({col} AS VARCHAR)
Safe cast pipeline
-- Normalise and cast in one step
SELECT TRY_CAST(finetype_cast(my_column) AS VARCHAR) AS clean_value
FROM my_table
WHERE finetype(my_column) = 'technology.development.version';

Struct Expansion

major: CAST(REGEXP_EXTRACT({col}, '^v?([0-9]+)') AS SMALLINT)
metadata: REGEXP_EXTRACT({col}, '\+([a-zA-Z0-9.]+)$')
minor: CAST(REGEXP_EXTRACT({col}, '^\.([0-9]+)') AS SMALLINT)
patch: CAST(REGEXP_EXTRACT({col}, '^\.([0-9]+)(?:-|\+|$)') AS SMALLINT)
prerelease: REGEXP_EXTRACT({col}, '-([a-zA-Z0-9.]+)(?:\+|$)')

JSON Schema

finetype schema technology.development.version
{
  "$id": "https://noon.sh/schemas/technology.development.version",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "description": "Software or document version in semantic versioning format (e.g., 1.2.3) or variant formats (e.g., v1.2.3, 1.2.3-alpha, 1.2.3+build). Resolves to VARCHAR.",
  "examples": [
    "1.2.3",
    "v1.2.3",
    "1.2.3-alpha",
    "1.2.3-beta.1",
    "1.2.3+build.123"
  ],
  "pattern": "^v?[0-9]+\\.[0-9]+\\.[0-9]+(?:-[a-zA-Z0-9.]+)?(?:\\+[a-zA-Z0-9.]+)?$",
  "title": "Version Number",
  "type": "string"
}

Examples

1.2.3v1.2.31.2.3-alpha1.2.3-beta.11.2.3+build.123

Types in technology