1034 lines
32 KiB
TypeScript
1034 lines
32 KiB
TypeScript
|
|
/* !!! This is code generated by Prisma. Do not edit directly. !!! */
|
|
/* eslint-disable */
|
|
// biome-ignore-all lint: generated file
|
|
// @ts-nocheck
|
|
/*
|
|
* This file exports the `test` model and its related types.
|
|
*
|
|
* 🟢 You can import this file directly.
|
|
*/
|
|
import type * as runtime from "@prisma/client/runtime/client"
|
|
import type * as $Enums from "../enums"
|
|
import type * as Prisma from "../internal/prismaNamespace"
|
|
|
|
/**
|
|
* Model test
|
|
*
|
|
*/
|
|
export type testModel = runtime.Types.Result.DefaultSelection<Prisma.$testPayload>
|
|
|
|
export type AggregateTest = {
|
|
_count: TestCountAggregateOutputType | null
|
|
_avg: TestAvgAggregateOutputType | null
|
|
_sum: TestSumAggregateOutputType | null
|
|
_min: TestMinAggregateOutputType | null
|
|
_max: TestMaxAggregateOutputType | null
|
|
}
|
|
|
|
export type TestAvgAggregateOutputType = {
|
|
id: number | null
|
|
c2: number | null
|
|
}
|
|
|
|
export type TestSumAggregateOutputType = {
|
|
id: number | null
|
|
c2: number | null
|
|
}
|
|
|
|
export type TestMinAggregateOutputType = {
|
|
id: number | null
|
|
text: string | null
|
|
c2: number | null
|
|
}
|
|
|
|
export type TestMaxAggregateOutputType = {
|
|
id: number | null
|
|
text: string | null
|
|
c2: number | null
|
|
}
|
|
|
|
export type TestCountAggregateOutputType = {
|
|
id: number
|
|
text: number
|
|
c2: number
|
|
_all: number
|
|
}
|
|
|
|
|
|
export type TestAvgAggregateInputType = {
|
|
id?: true
|
|
c2?: true
|
|
}
|
|
|
|
export type TestSumAggregateInputType = {
|
|
id?: true
|
|
c2?: true
|
|
}
|
|
|
|
export type TestMinAggregateInputType = {
|
|
id?: true
|
|
text?: true
|
|
c2?: true
|
|
}
|
|
|
|
export type TestMaxAggregateInputType = {
|
|
id?: true
|
|
text?: true
|
|
c2?: true
|
|
}
|
|
|
|
export type TestCountAggregateInputType = {
|
|
id?: true
|
|
text?: true
|
|
c2?: true
|
|
_all?: true
|
|
}
|
|
|
|
export type TestAggregateArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
|
/**
|
|
* Filter which test to aggregate.
|
|
*/
|
|
where?: Prisma.testWhereInput
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
|
|
*
|
|
* Determine the order of tests to fetch.
|
|
*/
|
|
orderBy?: Prisma.testOrderByWithRelationInput | Prisma.testOrderByWithRelationInput[]
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
|
|
*
|
|
* Sets the start position
|
|
*/
|
|
cursor?: Prisma.testWhereUniqueInput
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
|
|
*
|
|
* Take `±n` tests from the position of the cursor.
|
|
*/
|
|
take?: number
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
|
|
*
|
|
* Skip the first `n` tests.
|
|
*/
|
|
skip?: number
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
|
|
*
|
|
* Count returned tests
|
|
**/
|
|
_count?: true | TestCountAggregateInputType
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
|
|
*
|
|
* Select which fields to average
|
|
**/
|
|
_avg?: TestAvgAggregateInputType
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
|
|
*
|
|
* Select which fields to sum
|
|
**/
|
|
_sum?: TestSumAggregateInputType
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
|
|
*
|
|
* Select which fields to find the minimum value
|
|
**/
|
|
_min?: TestMinAggregateInputType
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
|
|
*
|
|
* Select which fields to find the maximum value
|
|
**/
|
|
_max?: TestMaxAggregateInputType
|
|
}
|
|
|
|
export type GetTestAggregateType<T extends TestAggregateArgs> = {
|
|
[P in keyof T & keyof AggregateTest]: P extends '_count' | 'count'
|
|
? T[P] extends true
|
|
? number
|
|
: Prisma.GetScalarType<T[P], AggregateTest[P]>
|
|
: Prisma.GetScalarType<T[P], AggregateTest[P]>
|
|
}
|
|
|
|
|
|
|
|
|
|
export type testGroupByArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
|
where?: Prisma.testWhereInput
|
|
orderBy?: Prisma.testOrderByWithAggregationInput | Prisma.testOrderByWithAggregationInput[]
|
|
by: Prisma.TestScalarFieldEnum[] | Prisma.TestScalarFieldEnum
|
|
having?: Prisma.testScalarWhereWithAggregatesInput
|
|
take?: number
|
|
skip?: number
|
|
_count?: TestCountAggregateInputType | true
|
|
_avg?: TestAvgAggregateInputType
|
|
_sum?: TestSumAggregateInputType
|
|
_min?: TestMinAggregateInputType
|
|
_max?: TestMaxAggregateInputType
|
|
}
|
|
|
|
export type TestGroupByOutputType = {
|
|
id: number
|
|
text: string
|
|
c2: number
|
|
_count: TestCountAggregateOutputType | null
|
|
_avg: TestAvgAggregateOutputType | null
|
|
_sum: TestSumAggregateOutputType | null
|
|
_min: TestMinAggregateOutputType | null
|
|
_max: TestMaxAggregateOutputType | null
|
|
}
|
|
|
|
type GetTestGroupByPayload<T extends testGroupByArgs> = Prisma.PrismaPromise<
|
|
Array<
|
|
Prisma.PickEnumerable<TestGroupByOutputType, T['by']> &
|
|
{
|
|
[P in ((keyof T) & (keyof TestGroupByOutputType))]: P extends '_count'
|
|
? T[P] extends boolean
|
|
? number
|
|
: Prisma.GetScalarType<T[P], TestGroupByOutputType[P]>
|
|
: Prisma.GetScalarType<T[P], TestGroupByOutputType[P]>
|
|
}
|
|
>
|
|
>
|
|
|
|
|
|
|
|
export type testWhereInput = {
|
|
AND?: Prisma.testWhereInput | Prisma.testWhereInput[]
|
|
OR?: Prisma.testWhereInput[]
|
|
NOT?: Prisma.testWhereInput | Prisma.testWhereInput[]
|
|
id?: Prisma.IntFilter<"test"> | number
|
|
text?: Prisma.StringFilter<"test"> | string
|
|
c2?: Prisma.IntFilter<"test"> | number
|
|
}
|
|
|
|
export type testOrderByWithRelationInput = {
|
|
id?: Prisma.SortOrder
|
|
text?: Prisma.SortOrder
|
|
c2?: Prisma.SortOrder
|
|
_relevance?: Prisma.testOrderByRelevanceInput
|
|
}
|
|
|
|
export type testWhereUniqueInput = Prisma.AtLeast<{
|
|
id?: number
|
|
AND?: Prisma.testWhereInput | Prisma.testWhereInput[]
|
|
OR?: Prisma.testWhereInput[]
|
|
NOT?: Prisma.testWhereInput | Prisma.testWhereInput[]
|
|
text?: Prisma.StringFilter<"test"> | string
|
|
c2?: Prisma.IntFilter<"test"> | number
|
|
}, "id">
|
|
|
|
export type testOrderByWithAggregationInput = {
|
|
id?: Prisma.SortOrder
|
|
text?: Prisma.SortOrder
|
|
c2?: Prisma.SortOrder
|
|
_count?: Prisma.testCountOrderByAggregateInput
|
|
_avg?: Prisma.testAvgOrderByAggregateInput
|
|
_max?: Prisma.testMaxOrderByAggregateInput
|
|
_min?: Prisma.testMinOrderByAggregateInput
|
|
_sum?: Prisma.testSumOrderByAggregateInput
|
|
}
|
|
|
|
export type testScalarWhereWithAggregatesInput = {
|
|
AND?: Prisma.testScalarWhereWithAggregatesInput | Prisma.testScalarWhereWithAggregatesInput[]
|
|
OR?: Prisma.testScalarWhereWithAggregatesInput[]
|
|
NOT?: Prisma.testScalarWhereWithAggregatesInput | Prisma.testScalarWhereWithAggregatesInput[]
|
|
id?: Prisma.IntWithAggregatesFilter<"test"> | number
|
|
text?: Prisma.StringWithAggregatesFilter<"test"> | string
|
|
c2?: Prisma.IntWithAggregatesFilter<"test"> | number
|
|
}
|
|
|
|
export type testCreateInput = {
|
|
text: string
|
|
c2?: number
|
|
}
|
|
|
|
export type testUncheckedCreateInput = {
|
|
id?: number
|
|
text: string
|
|
c2?: number
|
|
}
|
|
|
|
export type testUpdateInput = {
|
|
text?: Prisma.StringFieldUpdateOperationsInput | string
|
|
c2?: Prisma.IntFieldUpdateOperationsInput | number
|
|
}
|
|
|
|
export type testUncheckedUpdateInput = {
|
|
id?: Prisma.IntFieldUpdateOperationsInput | number
|
|
text?: Prisma.StringFieldUpdateOperationsInput | string
|
|
c2?: Prisma.IntFieldUpdateOperationsInput | number
|
|
}
|
|
|
|
export type testCreateManyInput = {
|
|
id?: number
|
|
text: string
|
|
c2?: number
|
|
}
|
|
|
|
export type testUpdateManyMutationInput = {
|
|
text?: Prisma.StringFieldUpdateOperationsInput | string
|
|
c2?: Prisma.IntFieldUpdateOperationsInput | number
|
|
}
|
|
|
|
export type testUncheckedUpdateManyInput = {
|
|
id?: Prisma.IntFieldUpdateOperationsInput | number
|
|
text?: Prisma.StringFieldUpdateOperationsInput | string
|
|
c2?: Prisma.IntFieldUpdateOperationsInput | number
|
|
}
|
|
|
|
export type testOrderByRelevanceInput = {
|
|
fields: Prisma.testOrderByRelevanceFieldEnum | Prisma.testOrderByRelevanceFieldEnum[]
|
|
sort: Prisma.SortOrder
|
|
search: string
|
|
}
|
|
|
|
export type testCountOrderByAggregateInput = {
|
|
id?: Prisma.SortOrder
|
|
text?: Prisma.SortOrder
|
|
c2?: Prisma.SortOrder
|
|
}
|
|
|
|
export type testAvgOrderByAggregateInput = {
|
|
id?: Prisma.SortOrder
|
|
c2?: Prisma.SortOrder
|
|
}
|
|
|
|
export type testMaxOrderByAggregateInput = {
|
|
id?: Prisma.SortOrder
|
|
text?: Prisma.SortOrder
|
|
c2?: Prisma.SortOrder
|
|
}
|
|
|
|
export type testMinOrderByAggregateInput = {
|
|
id?: Prisma.SortOrder
|
|
text?: Prisma.SortOrder
|
|
c2?: Prisma.SortOrder
|
|
}
|
|
|
|
export type testSumOrderByAggregateInput = {
|
|
id?: Prisma.SortOrder
|
|
c2?: Prisma.SortOrder
|
|
}
|
|
|
|
|
|
|
|
export type testSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
|
|
id?: boolean
|
|
text?: boolean
|
|
c2?: boolean
|
|
}, ExtArgs["result"]["test"]>
|
|
|
|
|
|
|
|
export type testSelectScalar = {
|
|
id?: boolean
|
|
text?: boolean
|
|
c2?: boolean
|
|
}
|
|
|
|
export type testOmit<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetOmit<"id" | "text" | "c2", ExtArgs["result"]["test"]>
|
|
|
|
export type $testPayload<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
|
name: "test"
|
|
objects: {}
|
|
scalars: runtime.Types.Extensions.GetPayloadResult<{
|
|
id: number
|
|
text: string
|
|
c2: number
|
|
}, ExtArgs["result"]["test"]>
|
|
composites: {}
|
|
}
|
|
|
|
export type testGetPayload<S extends boolean | null | undefined | testDefaultArgs> = runtime.Types.Result.GetResult<Prisma.$testPayload, S>
|
|
|
|
export type testCountArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> =
|
|
Omit<testFindManyArgs, 'select' | 'include' | 'distinct' | 'omit'> & {
|
|
select?: TestCountAggregateInputType | true
|
|
}
|
|
|
|
export interface testDelegate<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, GlobalOmitOptions = {}> {
|
|
[K: symbol]: { types: Prisma.TypeMap<ExtArgs>['model']['test'], meta: { name: 'test' } }
|
|
/**
|
|
* Find zero or one Test that matches the filter.
|
|
* @param {testFindUniqueArgs} args - Arguments to find a Test
|
|
* @example
|
|
* // Get one Test
|
|
* const test = await prisma.test.findUnique({
|
|
* where: {
|
|
* // ... provide filter here
|
|
* }
|
|
* })
|
|
*/
|
|
findUnique<T extends testFindUniqueArgs>(args: Prisma.SelectSubset<T, testFindUniqueArgs<ExtArgs>>): Prisma.Prisma__testClient<runtime.Types.Result.GetResult<Prisma.$testPayload<ExtArgs>, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>
|
|
|
|
/**
|
|
* Find one Test that matches the filter or throw an error with `error.code='P2025'`
|
|
* if no matches were found.
|
|
* @param {testFindUniqueOrThrowArgs} args - Arguments to find a Test
|
|
* @example
|
|
* // Get one Test
|
|
* const test = await prisma.test.findUniqueOrThrow({
|
|
* where: {
|
|
* // ... provide filter here
|
|
* }
|
|
* })
|
|
*/
|
|
findUniqueOrThrow<T extends testFindUniqueOrThrowArgs>(args: Prisma.SelectSubset<T, testFindUniqueOrThrowArgs<ExtArgs>>): Prisma.Prisma__testClient<runtime.Types.Result.GetResult<Prisma.$testPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>
|
|
|
|
/**
|
|
* Find the first Test that matches the filter.
|
|
* Note, that providing `undefined` is treated as the value not being there.
|
|
* Read more here: https://pris.ly/d/null-undefined
|
|
* @param {testFindFirstArgs} args - Arguments to find a Test
|
|
* @example
|
|
* // Get one Test
|
|
* const test = await prisma.test.findFirst({
|
|
* where: {
|
|
* // ... provide filter here
|
|
* }
|
|
* })
|
|
*/
|
|
findFirst<T extends testFindFirstArgs>(args?: Prisma.SelectSubset<T, testFindFirstArgs<ExtArgs>>): Prisma.Prisma__testClient<runtime.Types.Result.GetResult<Prisma.$testPayload<ExtArgs>, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>
|
|
|
|
/**
|
|
* Find the first Test that matches the filter or
|
|
* throw `PrismaKnownClientError` with `P2025` code if no matches were found.
|
|
* Note, that providing `undefined` is treated as the value not being there.
|
|
* Read more here: https://pris.ly/d/null-undefined
|
|
* @param {testFindFirstOrThrowArgs} args - Arguments to find a Test
|
|
* @example
|
|
* // Get one Test
|
|
* const test = await prisma.test.findFirstOrThrow({
|
|
* where: {
|
|
* // ... provide filter here
|
|
* }
|
|
* })
|
|
*/
|
|
findFirstOrThrow<T extends testFindFirstOrThrowArgs>(args?: Prisma.SelectSubset<T, testFindFirstOrThrowArgs<ExtArgs>>): Prisma.Prisma__testClient<runtime.Types.Result.GetResult<Prisma.$testPayload<ExtArgs>, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>
|
|
|
|
/**
|
|
* Find zero or more Tests that matches the filter.
|
|
* Note, that providing `undefined` is treated as the value not being there.
|
|
* Read more here: https://pris.ly/d/null-undefined
|
|
* @param {testFindManyArgs} args - Arguments to filter and select certain fields only.
|
|
* @example
|
|
* // Get all Tests
|
|
* const tests = await prisma.test.findMany()
|
|
*
|
|
* // Get first 10 Tests
|
|
* const tests = await prisma.test.findMany({ take: 10 })
|
|
*
|
|
* // Only select the `id`
|
|
* const testWithIdOnly = await prisma.test.findMany({ select: { id: true } })
|
|
*
|
|
*/
|
|
findMany<T extends testFindManyArgs>(args?: Prisma.SelectSubset<T, testFindManyArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$testPayload<ExtArgs>, T, "findMany", GlobalOmitOptions>>
|
|
|
|
/**
|
|
* Create a Test.
|
|
* @param {testCreateArgs} args - Arguments to create a Test.
|
|
* @example
|
|
* // Create one Test
|
|
* const Test = await prisma.test.create({
|
|
* data: {
|
|
* // ... data to create a Test
|
|
* }
|
|
* })
|
|
*
|
|
*/
|
|
create<T extends testCreateArgs>(args: Prisma.SelectSubset<T, testCreateArgs<ExtArgs>>): Prisma.Prisma__testClient<runtime.Types.Result.GetResult<Prisma.$testPayload<ExtArgs>, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>
|
|
|
|
/**
|
|
* Create many Tests.
|
|
* @param {testCreateManyArgs} args - Arguments to create many Tests.
|
|
* @example
|
|
* // Create many Tests
|
|
* const test = await prisma.test.createMany({
|
|
* data: [
|
|
* // ... provide data here
|
|
* ]
|
|
* })
|
|
*
|
|
*/
|
|
createMany<T extends testCreateManyArgs>(args?: Prisma.SelectSubset<T, testCreateManyArgs<ExtArgs>>): Prisma.PrismaPromise<Prisma.BatchPayload>
|
|
|
|
/**
|
|
* Delete a Test.
|
|
* @param {testDeleteArgs} args - Arguments to delete one Test.
|
|
* @example
|
|
* // Delete one Test
|
|
* const Test = await prisma.test.delete({
|
|
* where: {
|
|
* // ... filter to delete one Test
|
|
* }
|
|
* })
|
|
*
|
|
*/
|
|
delete<T extends testDeleteArgs>(args: Prisma.SelectSubset<T, testDeleteArgs<ExtArgs>>): Prisma.Prisma__testClient<runtime.Types.Result.GetResult<Prisma.$testPayload<ExtArgs>, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>
|
|
|
|
/**
|
|
* Update one Test.
|
|
* @param {testUpdateArgs} args - Arguments to update one Test.
|
|
* @example
|
|
* // Update one Test
|
|
* const test = await prisma.test.update({
|
|
* where: {
|
|
* // ... provide filter here
|
|
* },
|
|
* data: {
|
|
* // ... provide data here
|
|
* }
|
|
* })
|
|
*
|
|
*/
|
|
update<T extends testUpdateArgs>(args: Prisma.SelectSubset<T, testUpdateArgs<ExtArgs>>): Prisma.Prisma__testClient<runtime.Types.Result.GetResult<Prisma.$testPayload<ExtArgs>, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>
|
|
|
|
/**
|
|
* Delete zero or more Tests.
|
|
* @param {testDeleteManyArgs} args - Arguments to filter Tests to delete.
|
|
* @example
|
|
* // Delete a few Tests
|
|
* const { count } = await prisma.test.deleteMany({
|
|
* where: {
|
|
* // ... provide filter here
|
|
* }
|
|
* })
|
|
*
|
|
*/
|
|
deleteMany<T extends testDeleteManyArgs>(args?: Prisma.SelectSubset<T, testDeleteManyArgs<ExtArgs>>): Prisma.PrismaPromise<Prisma.BatchPayload>
|
|
|
|
/**
|
|
* Update zero or more Tests.
|
|
* Note, that providing `undefined` is treated as the value not being there.
|
|
* Read more here: https://pris.ly/d/null-undefined
|
|
* @param {testUpdateManyArgs} args - Arguments to update one or more rows.
|
|
* @example
|
|
* // Update many Tests
|
|
* const test = await prisma.test.updateMany({
|
|
* where: {
|
|
* // ... provide filter here
|
|
* },
|
|
* data: {
|
|
* // ... provide data here
|
|
* }
|
|
* })
|
|
*
|
|
*/
|
|
updateMany<T extends testUpdateManyArgs>(args: Prisma.SelectSubset<T, testUpdateManyArgs<ExtArgs>>): Prisma.PrismaPromise<Prisma.BatchPayload>
|
|
|
|
/**
|
|
* Create or update one Test.
|
|
* @param {testUpsertArgs} args - Arguments to update or create a Test.
|
|
* @example
|
|
* // Update or create a Test
|
|
* const test = await prisma.test.upsert({
|
|
* create: {
|
|
* // ... data to create a Test
|
|
* },
|
|
* update: {
|
|
* // ... in case it already exists, update
|
|
* },
|
|
* where: {
|
|
* // ... the filter for the Test we want to update
|
|
* }
|
|
* })
|
|
*/
|
|
upsert<T extends testUpsertArgs>(args: Prisma.SelectSubset<T, testUpsertArgs<ExtArgs>>): Prisma.Prisma__testClient<runtime.Types.Result.GetResult<Prisma.$testPayload<ExtArgs>, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>
|
|
|
|
|
|
/**
|
|
* Count the number of Tests.
|
|
* Note, that providing `undefined` is treated as the value not being there.
|
|
* Read more here: https://pris.ly/d/null-undefined
|
|
* @param {testCountArgs} args - Arguments to filter Tests to count.
|
|
* @example
|
|
* // Count the number of Tests
|
|
* const count = await prisma.test.count({
|
|
* where: {
|
|
* // ... the filter for the Tests we want to count
|
|
* }
|
|
* })
|
|
**/
|
|
count<T extends testCountArgs>(
|
|
args?: Prisma.Subset<T, testCountArgs>,
|
|
): Prisma.PrismaPromise<
|
|
T extends runtime.Types.Utils.Record<'select', any>
|
|
? T['select'] extends true
|
|
? number
|
|
: Prisma.GetScalarType<T['select'], TestCountAggregateOutputType>
|
|
: number
|
|
>
|
|
|
|
/**
|
|
* Allows you to perform aggregations operations on a Test.
|
|
* Note, that providing `undefined` is treated as the value not being there.
|
|
* Read more here: https://pris.ly/d/null-undefined
|
|
* @param {TestAggregateArgs} args - Select which aggregations you would like to apply and on what fields.
|
|
* @example
|
|
* // Ordered by age ascending
|
|
* // Where email contains prisma.io
|
|
* // Limited to the 10 users
|
|
* const aggregations = await prisma.user.aggregate({
|
|
* _avg: {
|
|
* age: true,
|
|
* },
|
|
* where: {
|
|
* email: {
|
|
* contains: "prisma.io",
|
|
* },
|
|
* },
|
|
* orderBy: {
|
|
* age: "asc",
|
|
* },
|
|
* take: 10,
|
|
* })
|
|
**/
|
|
aggregate<T extends TestAggregateArgs>(args: Prisma.Subset<T, TestAggregateArgs>): Prisma.PrismaPromise<GetTestAggregateType<T>>
|
|
|
|
/**
|
|
* Group by Test.
|
|
* Note, that providing `undefined` is treated as the value not being there.
|
|
* Read more here: https://pris.ly/d/null-undefined
|
|
* @param {testGroupByArgs} args - Group by arguments.
|
|
* @example
|
|
* // Group by city, order by createdAt, get count
|
|
* const result = await prisma.user.groupBy({
|
|
* by: ['city', 'createdAt'],
|
|
* orderBy: {
|
|
* createdAt: true
|
|
* },
|
|
* _count: {
|
|
* _all: true
|
|
* },
|
|
* })
|
|
*
|
|
**/
|
|
groupBy<
|
|
T extends testGroupByArgs,
|
|
HasSelectOrTake extends Prisma.Or<
|
|
Prisma.Extends<'skip', Prisma.Keys<T>>,
|
|
Prisma.Extends<'take', Prisma.Keys<T>>
|
|
>,
|
|
OrderByArg extends Prisma.True extends HasSelectOrTake
|
|
? { orderBy: testGroupByArgs['orderBy'] }
|
|
: { orderBy?: testGroupByArgs['orderBy'] },
|
|
OrderFields extends Prisma.ExcludeUnderscoreKeys<Prisma.Keys<Prisma.MaybeTupleToUnion<T['orderBy']>>>,
|
|
ByFields extends Prisma.MaybeTupleToUnion<T['by']>,
|
|
ByValid extends Prisma.Has<ByFields, OrderFields>,
|
|
HavingFields extends Prisma.GetHavingFields<T['having']>,
|
|
HavingValid extends Prisma.Has<ByFields, HavingFields>,
|
|
ByEmpty extends T['by'] extends never[] ? Prisma.True : Prisma.False,
|
|
InputErrors extends ByEmpty extends Prisma.True
|
|
? `Error: "by" must not be empty.`
|
|
: HavingValid extends Prisma.False
|
|
? {
|
|
[P in HavingFields]: P extends ByFields
|
|
? never
|
|
: P extends string
|
|
? `Error: Field "${P}" used in "having" needs to be provided in "by".`
|
|
: [
|
|
Error,
|
|
'Field ',
|
|
P,
|
|
` in "having" needs to be provided in "by"`,
|
|
]
|
|
}[HavingFields]
|
|
: 'take' extends Prisma.Keys<T>
|
|
? 'orderBy' extends Prisma.Keys<T>
|
|
? ByValid extends Prisma.True
|
|
? {}
|
|
: {
|
|
[P in OrderFields]: P extends ByFields
|
|
? never
|
|
: `Error: Field "${P}" in "orderBy" needs to be provided in "by"`
|
|
}[OrderFields]
|
|
: 'Error: If you provide "take", you also need to provide "orderBy"'
|
|
: 'skip' extends Prisma.Keys<T>
|
|
? 'orderBy' extends Prisma.Keys<T>
|
|
? ByValid extends Prisma.True
|
|
? {}
|
|
: {
|
|
[P in OrderFields]: P extends ByFields
|
|
? never
|
|
: `Error: Field "${P}" in "orderBy" needs to be provided in "by"`
|
|
}[OrderFields]
|
|
: 'Error: If you provide "skip", you also need to provide "orderBy"'
|
|
: ByValid extends Prisma.True
|
|
? {}
|
|
: {
|
|
[P in OrderFields]: P extends ByFields
|
|
? never
|
|
: `Error: Field "${P}" in "orderBy" needs to be provided in "by"`
|
|
}[OrderFields]
|
|
>(args: Prisma.SubsetIntersection<T, testGroupByArgs, OrderByArg> & InputErrors): {} extends InputErrors ? GetTestGroupByPayload<T> : Prisma.PrismaPromise<InputErrors>
|
|
/**
|
|
* Fields of the test model
|
|
*/
|
|
readonly fields: testFieldRefs;
|
|
}
|
|
|
|
/**
|
|
* The delegate class that acts as a "Promise-like" for test.
|
|
* Why is this prefixed with `Prisma__`?
|
|
* Because we want to prevent naming conflicts as mentioned in
|
|
* https://github.com/prisma/prisma-client-js/issues/707
|
|
*/
|
|
export interface Prisma__testClient<T, Null = never, ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, GlobalOmitOptions = {}> extends Prisma.PrismaPromise<T> {
|
|
readonly [Symbol.toStringTag]: "PrismaPromise"
|
|
/**
|
|
* Attaches callbacks for the resolution and/or rejection of the Promise.
|
|
* @param onfulfilled The callback to execute when the Promise is resolved.
|
|
* @param onrejected The callback to execute when the Promise is rejected.
|
|
* @returns A Promise for the completion of which ever callback is executed.
|
|
*/
|
|
then<TResult1 = T, TResult2 = never>(onfulfilled?: ((value: T) => TResult1 | PromiseLike<TResult1>) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | undefined | null): runtime.Types.Utils.JsPromise<TResult1 | TResult2>
|
|
/**
|
|
* Attaches a callback for only the rejection of the Promise.
|
|
* @param onrejected The callback to execute when the Promise is rejected.
|
|
* @returns A Promise for the completion of the callback.
|
|
*/
|
|
catch<TResult = never>(onrejected?: ((reason: any) => TResult | PromiseLike<TResult>) | undefined | null): runtime.Types.Utils.JsPromise<T | TResult>
|
|
/**
|
|
* Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The
|
|
* resolved value cannot be modified from the callback.
|
|
* @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected).
|
|
* @returns A Promise for the completion of the callback.
|
|
*/
|
|
finally(onfinally?: (() => void) | undefined | null): runtime.Types.Utils.JsPromise<T>
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
* Fields of the test model
|
|
*/
|
|
export interface testFieldRefs {
|
|
readonly id: Prisma.FieldRef<"test", 'Int'>
|
|
readonly text: Prisma.FieldRef<"test", 'String'>
|
|
readonly c2: Prisma.FieldRef<"test", 'Int'>
|
|
}
|
|
|
|
|
|
// Custom InputTypes
|
|
/**
|
|
* test findUnique
|
|
*/
|
|
export type testFindUniqueArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
|
/**
|
|
* Select specific fields to fetch from the test
|
|
*/
|
|
select?: Prisma.testSelect<ExtArgs> | null
|
|
/**
|
|
* Omit specific fields from the test
|
|
*/
|
|
omit?: Prisma.testOmit<ExtArgs> | null
|
|
/**
|
|
* Filter, which test to fetch.
|
|
*/
|
|
where: Prisma.testWhereUniqueInput
|
|
}
|
|
|
|
/**
|
|
* test findUniqueOrThrow
|
|
*/
|
|
export type testFindUniqueOrThrowArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
|
/**
|
|
* Select specific fields to fetch from the test
|
|
*/
|
|
select?: Prisma.testSelect<ExtArgs> | null
|
|
/**
|
|
* Omit specific fields from the test
|
|
*/
|
|
omit?: Prisma.testOmit<ExtArgs> | null
|
|
/**
|
|
* Filter, which test to fetch.
|
|
*/
|
|
where: Prisma.testWhereUniqueInput
|
|
}
|
|
|
|
/**
|
|
* test findFirst
|
|
*/
|
|
export type testFindFirstArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
|
/**
|
|
* Select specific fields to fetch from the test
|
|
*/
|
|
select?: Prisma.testSelect<ExtArgs> | null
|
|
/**
|
|
* Omit specific fields from the test
|
|
*/
|
|
omit?: Prisma.testOmit<ExtArgs> | null
|
|
/**
|
|
* Filter, which test to fetch.
|
|
*/
|
|
where?: Prisma.testWhereInput
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
|
|
*
|
|
* Determine the order of tests to fetch.
|
|
*/
|
|
orderBy?: Prisma.testOrderByWithRelationInput | Prisma.testOrderByWithRelationInput[]
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
|
|
*
|
|
* Sets the position for searching for tests.
|
|
*/
|
|
cursor?: Prisma.testWhereUniqueInput
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
|
|
*
|
|
* Take `±n` tests from the position of the cursor.
|
|
*/
|
|
take?: number
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
|
|
*
|
|
* Skip the first `n` tests.
|
|
*/
|
|
skip?: number
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
|
|
*
|
|
* Filter by unique combinations of tests.
|
|
*/
|
|
distinct?: Prisma.TestScalarFieldEnum | Prisma.TestScalarFieldEnum[]
|
|
}
|
|
|
|
/**
|
|
* test findFirstOrThrow
|
|
*/
|
|
export type testFindFirstOrThrowArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
|
/**
|
|
* Select specific fields to fetch from the test
|
|
*/
|
|
select?: Prisma.testSelect<ExtArgs> | null
|
|
/**
|
|
* Omit specific fields from the test
|
|
*/
|
|
omit?: Prisma.testOmit<ExtArgs> | null
|
|
/**
|
|
* Filter, which test to fetch.
|
|
*/
|
|
where?: Prisma.testWhereInput
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
|
|
*
|
|
* Determine the order of tests to fetch.
|
|
*/
|
|
orderBy?: Prisma.testOrderByWithRelationInput | Prisma.testOrderByWithRelationInput[]
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
|
|
*
|
|
* Sets the position for searching for tests.
|
|
*/
|
|
cursor?: Prisma.testWhereUniqueInput
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
|
|
*
|
|
* Take `±n` tests from the position of the cursor.
|
|
*/
|
|
take?: number
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
|
|
*
|
|
* Skip the first `n` tests.
|
|
*/
|
|
skip?: number
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
|
|
*
|
|
* Filter by unique combinations of tests.
|
|
*/
|
|
distinct?: Prisma.TestScalarFieldEnum | Prisma.TestScalarFieldEnum[]
|
|
}
|
|
|
|
/**
|
|
* test findMany
|
|
*/
|
|
export type testFindManyArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
|
/**
|
|
* Select specific fields to fetch from the test
|
|
*/
|
|
select?: Prisma.testSelect<ExtArgs> | null
|
|
/**
|
|
* Omit specific fields from the test
|
|
*/
|
|
omit?: Prisma.testOmit<ExtArgs> | null
|
|
/**
|
|
* Filter, which tests to fetch.
|
|
*/
|
|
where?: Prisma.testWhereInput
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
|
|
*
|
|
* Determine the order of tests to fetch.
|
|
*/
|
|
orderBy?: Prisma.testOrderByWithRelationInput | Prisma.testOrderByWithRelationInput[]
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
|
|
*
|
|
* Sets the position for listing tests.
|
|
*/
|
|
cursor?: Prisma.testWhereUniqueInput
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
|
|
*
|
|
* Take `±n` tests from the position of the cursor.
|
|
*/
|
|
take?: number
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
|
|
*
|
|
* Skip the first `n` tests.
|
|
*/
|
|
skip?: number
|
|
distinct?: Prisma.TestScalarFieldEnum | Prisma.TestScalarFieldEnum[]
|
|
}
|
|
|
|
/**
|
|
* test create
|
|
*/
|
|
export type testCreateArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
|
/**
|
|
* Select specific fields to fetch from the test
|
|
*/
|
|
select?: Prisma.testSelect<ExtArgs> | null
|
|
/**
|
|
* Omit specific fields from the test
|
|
*/
|
|
omit?: Prisma.testOmit<ExtArgs> | null
|
|
/**
|
|
* The data needed to create a test.
|
|
*/
|
|
data: Prisma.XOR<Prisma.testCreateInput, Prisma.testUncheckedCreateInput>
|
|
}
|
|
|
|
/**
|
|
* test createMany
|
|
*/
|
|
export type testCreateManyArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
|
/**
|
|
* The data used to create many tests.
|
|
*/
|
|
data: Prisma.testCreateManyInput | Prisma.testCreateManyInput[]
|
|
skipDuplicates?: boolean
|
|
}
|
|
|
|
/**
|
|
* test update
|
|
*/
|
|
export type testUpdateArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
|
/**
|
|
* Select specific fields to fetch from the test
|
|
*/
|
|
select?: Prisma.testSelect<ExtArgs> | null
|
|
/**
|
|
* Omit specific fields from the test
|
|
*/
|
|
omit?: Prisma.testOmit<ExtArgs> | null
|
|
/**
|
|
* The data needed to update a test.
|
|
*/
|
|
data: Prisma.XOR<Prisma.testUpdateInput, Prisma.testUncheckedUpdateInput>
|
|
/**
|
|
* Choose, which test to update.
|
|
*/
|
|
where: Prisma.testWhereUniqueInput
|
|
}
|
|
|
|
/**
|
|
* test updateMany
|
|
*/
|
|
export type testUpdateManyArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
|
/**
|
|
* The data used to update tests.
|
|
*/
|
|
data: Prisma.XOR<Prisma.testUpdateManyMutationInput, Prisma.testUncheckedUpdateManyInput>
|
|
/**
|
|
* Filter which tests to update
|
|
*/
|
|
where?: Prisma.testWhereInput
|
|
/**
|
|
* Limit how many tests to update.
|
|
*/
|
|
limit?: number
|
|
}
|
|
|
|
/**
|
|
* test upsert
|
|
*/
|
|
export type testUpsertArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
|
/**
|
|
* Select specific fields to fetch from the test
|
|
*/
|
|
select?: Prisma.testSelect<ExtArgs> | null
|
|
/**
|
|
* Omit specific fields from the test
|
|
*/
|
|
omit?: Prisma.testOmit<ExtArgs> | null
|
|
/**
|
|
* The filter to search for the test to update in case it exists.
|
|
*/
|
|
where: Prisma.testWhereUniqueInput
|
|
/**
|
|
* In case the test found by the `where` argument doesn't exist, create a new test with this data.
|
|
*/
|
|
create: Prisma.XOR<Prisma.testCreateInput, Prisma.testUncheckedCreateInput>
|
|
/**
|
|
* In case the test was found with the provided `where` argument, update it with this data.
|
|
*/
|
|
update: Prisma.XOR<Prisma.testUpdateInput, Prisma.testUncheckedUpdateInput>
|
|
}
|
|
|
|
/**
|
|
* test delete
|
|
*/
|
|
export type testDeleteArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
|
/**
|
|
* Select specific fields to fetch from the test
|
|
*/
|
|
select?: Prisma.testSelect<ExtArgs> | null
|
|
/**
|
|
* Omit specific fields from the test
|
|
*/
|
|
omit?: Prisma.testOmit<ExtArgs> | null
|
|
/**
|
|
* Filter which test to delete.
|
|
*/
|
|
where: Prisma.testWhereUniqueInput
|
|
}
|
|
|
|
/**
|
|
* test deleteMany
|
|
*/
|
|
export type testDeleteManyArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
|
/**
|
|
* Filter which tests to delete
|
|
*/
|
|
where?: Prisma.testWhereInput
|
|
/**
|
|
* Limit how many tests to delete.
|
|
*/
|
|
limit?: number
|
|
}
|
|
|
|
/**
|
|
* test without action
|
|
*/
|
|
export type testDefaultArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
|
/**
|
|
* Select specific fields to fetch from the test
|
|
*/
|
|
select?: Prisma.testSelect<ExtArgs> | null
|
|
/**
|
|
* Omit specific fields from the test
|
|
*/
|
|
omit?: Prisma.testOmit<ExtArgs> | null
|
|
}
|