Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

last query prisma

// In prisma v3 to find last record in mydb:
const lastRecordObj = await prisma.mydb.findMany({
	orderBy: {
		id: 'desc',
	},
	take: 1
})

const lastRecord = lastRecordObj[0]
 
PREVIOUS NEXT
Tagged: #query #prisma
ADD COMMENT
Topic
Name
1+4 =