new·The score now tells you which way it movedA brain's exam only ever grows: its own material writes questions, and so does every question a real caller asked and did not get answered. The score is a percentage over that growing set, so a brain that learned more could post a smaller number — and this week three did. One of them answered two MORE questions than the week before and showed eighteen points less. Printed as a single percentage, that reads as decline to a reader and as punishment to anyone who contributes material.all news →
mozg.beta
Sign in

Drizzle · SQLite · all subjects

arktype/data-types

20 notes, read out of this brain and free to use. Each one was extracted from a source and is re-checked against its exam.

arktype mapping for sqlite.numeric and text

The SQLite column definitions sqlite.numeric() and sqlite.text({ mode: 'text' }) map to the arktype schema type.string.

arktype mapping for sqlite.integer with mode boolean

The SQLite column definition sqlite.integer({ mode: 'boolean' }) maps to the arktype schema type.boolean.

arktype mapping for sqlite.integer with mode timestamp

The SQLite column definitions sqlite.integer({ mode: 'timestamp' }) and sqlite.integer({ mode: 'timestamp_ms' }) both map to the arktype schema type.Date.

arktype mapping for sqlite.text with length

The SQLite column definition sqlite.text({ mode: 'text', length: ... }) maps to the arktype schema type.string.atMostLength(length).

arktype mapping for sqlite.text with enum

The SQLite column definition sqlite.text({ mode: 'text', enum: ... }) maps to the arktype schema type.enumerated(...enum).

arktype mapping for sqlite.real

The SQLite column definition sqlite.real() maps to the arktype schema type.number.atLeast(-140_737_488_355_328).atMost(140_737_488_355_327), which enforces 48-bit integer limits.

arktype mapping for sqlite.integer with mode number

The SQLite column definition sqlite.integer({ mode: 'number' }) maps to the arktype schema type.keywords.number.integer.atLeast(-9_007_199_254_740_991).atMost(9_007_199_254_740_991), which enforces JavaScript's minimum and maximum safe integers.

arktype mapping for sqlite.blob with mode bigint

The SQLite column definition sqlite.blob({ mode: 'bigint' }) maps to the arktype schema type.bigint.narrow((value, ctx) => value < -9_223_372_036_854_775_808n ? ctx.mustBe('greater than') : value > 9_223_372_036_854_775_807n ? ctx.mustBe('less than') : true), which enforces 64-bit integer limits.

arktype mapping for sqlite.blob and text with mode json

The SQLite column definitions sqlite.blob({ mode: 'json' }) and sqlite.text({ mode: 'json' }) map to the arktype schema type('string | number | boolean | null').or(type('unknown.any[] | Record<string, unknown.any>')).

arktype mapping for sqlite.blob with mode buffer

The SQLite column definition sqlite.blob({ mode: 'buffer' }) maps to the arktype schema type.instanceOf(Buffer).

integer mode boolean maps to Typebox Boolean

SQLite columns defined as sqlite.integer({ mode: 'boolean' }) generate Typebox schemas of Type.Boolean().

integer mode timestamp and timestamp_ms map to Typebox Date

SQLite columns defined as sqlite.integer({ mode: 'timestamp' }) or sqlite.integer({ mode: 'timestamp_ms' }) generate Typebox schemas of Type.Date().

numeric and text mode text map to Typebox String

SQLite columns defined as sqlite.numeric() or sqlite.text({ mode: 'text' }) generate Typebox schemas of Type.String().

text mode with length parameter maps to Typebox String with maxLength

SQLite columns defined as sqlite.text({ mode: 'text', length: ... }) generate Typebox schemas of Type.String({ maxLength: length }).

text mode with enum parameter maps to Typebox Enum

SQLite columns defined as sqlite.text({ mode: 'text', enum: ... }) generate Typebox schemas of Type.Enum(enum).

real maps to Typebox Number with 48-bit bounds

SQLite columns defined as sqlite.real() generate Typebox schemas of Type.Number({ minimum: -140_737_488_355_328, maximum: 140_737_488_355_327 }), using 48-bit integer limits.

integer mode number maps to Typebox Integer with safe integer bounds

SQLite columns defined as sqlite.integer({ mode: 'number' }) generate Typebox schemas of Type.Integer({ minimum: -9_007_199_254_740_991, maximum: 9_007_199_254_740_991 }), using JavaScript's minimum and maximum safe integers.

blob mode bigint maps to Typebox BigInt with 64-bit bounds

SQLite columns defined as sqlite.blob({ mode: 'bigint' }) generate Typebox schemas of Type.BigInt({ minimum: -9_223_372_036_854_775_808n, maximum: 9_223_372_036_854_775_807n }), using 64-bit integer limits.

blob mode json and text mode json map to Typebox Recursive Union

SQLite columns defined as sqlite.blob({ mode: 'json' }) or sqlite.text({ mode: 'json' }) generate Typebox schemas of Type.Recursive((self) => Type.Union([Type.Union([Type.String(), Type.Number(), Type.Boolean(), Type.Null()]), Type.Array(self), Type.Record(Type.String(), self)])).

blob mode buffer maps to Typebox Union with Any array and record

SQLite columns defined as sqlite.blob({ mode: 'buffer' }) generate Typebox schemas of t.Union([t.Union([t.String(), t.Number(), t.Boolean(), t.Null()]), t.Array(t.Any()), t.Record(t.String(), t.Any())]).

Give your agent this brain