Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
})
export const ColumnKind = t.Union(t.String, t.Function).withConstraint(value => {
const type = isFunction(value) ? value.name : String(value)
return type.toLowerCase() in ColumnTypes
}, { name: 'ColumnKind' })
export const ColumnDescriptor = t.Partial({
defaultTo: t.Unknown,
index: t.String,
notNullable: t.Boolean,
nullable: t.Boolean,
primary: t.Boolean,
unique: t.Boolean,
type: ColumnKind,
get: t.Function,
set: t.Function
})
export type Index = t.Static
export type Order = t.Static
export type Group = t.Static
export type TrilogyOptions = t.Static
export type ModelOptions = t.Static
export type AggregateOptions = t.Static
export type CreateOptions = t.Static
export type UpdateOptions = t.Static
export type FindOptions = t.Static
export type ColumnKind = t.Static
export type ColumnDescriptor = t.Static
raw: t.Boolean
})
export const FindOptions = t.Partial({
limit: t.Number,
order: OrderClause,
random: t.Boolean,
raw: t.Boolean,
skip: t.Number
})
export const UpdateOptions = t.Partial({
raw: t.Boolean
})
export const ColumnKind = t.Union(t.String, t.Function).withConstraint(value => {
const type = isFunction(value) ? value.name : String(value)
return type.toLowerCase() in ColumnTypes
}, { name: 'ColumnKind' })
export const ColumnDescriptor = t.Partial({
defaultTo: t.Unknown,
index: t.String,
notNullable: t.Boolean,
nullable: t.Boolean,
primary: t.Boolean,
unique: t.Boolean,
type: ColumnKind,
get: t.Function,
set: t.Function
})
export const ColumnKind = t.Union(t.String, t.Function).withConstraint(value => {
const type = isFunction(value) ? value.name : String(value)
return type.toLowerCase() in ColumnTypes
}, { name: 'ColumnKind' })
export const ColumnDescriptor = t.Partial({
defaultTo: t.Unknown,
index: t.String,
notNullable: t.Boolean,
nullable: t.Boolean,
primary: t.Boolean,
unique: t.Boolean,
type: ColumnKind,
get: t.Function,
set: t.Function
})
export type Index = t.Static
export type Order = t.Static
export type Group = t.Static
export type TrilogyOptions = t.Static
export type ModelOptions = t.Static
export type AggregateOptions = t.Static
export type CreateOptions = t.Static
export type UpdateOptions = t.Static
export type FindOptions = t.Static
export type ColumnKind = t.Static
export type ColumnDescriptor = t.Static
export type SchemaRaw = {