OptionaloptionsArg: Subset<ClientOptions, PrismaClientOptions>const prisma = new PrismaClient()
// Fetch zero or more Clients
const clients = await prisma.client.findMany()
Read more in our docs.
prisma.activeInvite: Exposes CRUD operations for the ActiveInvite model.
prisma.allEnumsModel: Exposes CRUD operations for the AllEnumsModel model.
prisma.client: Exposes CRUD operations for the Client model.
prisma.clientBlog: Exposes CRUD operations for the ClientBlog model.
prisma.clientChangelog: Exposes CRUD operations for the ClientChangelog model.
prisma.clientFAQ: Exposes CRUD operations for the ClientFAQ model.
prisma.clientLogRawData: Exposes CRUD operations for the ClientLogRawData model.
prisma.drop: Exposes CRUD operations for the Drop model.
prisma.dropGame: Exposes CRUD operations for the DropGame model.
prisma.guild: Exposes CRUD operations for the Guild model.
prisma.guildAutoLiveRole: Exposes CRUD operations for the GuildAutoLiveRole model.
prisma.guildAutoLiveRoleFilter: Exposes CRUD operations for the GuildAutoLiveRoleFilter model.
prisma.guildCustomMessage: Exposes CRUD operations for the GuildCustomMessage model.
prisma.guildCustomSingleMessage: Exposes CRUD operations for the GuildCustomSingleMessage model.
prisma.guildDisableBranding: Exposes CRUD operations for the GuildDisableBranding model.
prisma.guildDrops: Exposes CRUD operations for the GuildDrops model.
prisma.guildDropsGame: Exposes CRUD operations for the GuildDropsGame model.
prisma.guildDropsGameWebhook: Exposes CRUD operations for the GuildDropsGameWebhook model.
prisma.guildDropsWebhook: Exposes CRUD operations for the GuildDropsWebhook model.
prisma.guildEmbedField: Exposes CRUD operations for the GuildEmbedField model.
prisma.guildGettingStarted: Exposes CRUD operations for the GuildGettingStarted model.
prisma.guildGiveaway: Exposes CRUD operations for the GuildGiveaway model.
prisma.guildGiveawayEntry: Exposes CRUD operations for the GuildGiveawayEntry model.
prisma.guildGiveawayFilter: Exposes CRUD operations for the GuildGiveawayFilter model.
prisma.guildGiveawayRequirements: Exposes CRUD operations for the GuildGiveawayRequirements model.
prisma.guildGiveawayRoleBonus: Exposes CRUD operations for the GuildGiveawayRoleBonus model.
prisma.guildLinkedRole: Exposes CRUD operations for the GuildLinkedRole model.
prisma.guildMessageButton: Exposes CRUD operations for the GuildMessageButton model.
prisma.guildMessageEmbed: Exposes CRUD operations for the GuildMessageEmbed model.
prisma.guildMessageWebhook: Exposes CRUD operations for the GuildMessageWebhook model.
prisma.guildNotificationOverride: Exposes CRUD operations for the GuildNotificationOverride model.
prisma.guildPremium: Exposes CRUD operations for the GuildPremium model.
prisma.guildRandomMessage: Exposes CRUD operations for the GuildRandomMessage model.
prisma.guildSingleMessageWebhook: Exposes CRUD operations for the GuildSingleMessageWebhook model.
prisma.guildStarboard: Exposes CRUD operations for the GuildStarboard model.
prisma.guildStarboardFilter: Exposes CRUD operations for the GuildStarboardFilter model.
prisma.guildStarboardMessage: Exposes CRUD operations for the GuildStarboardMessage model.
prisma.guildStarboardMessages: Exposes CRUD operations for the GuildStarboardMessages model.
prisma.guildStatusRole: Exposes CRUD operations for the GuildStatusRole model.
prisma.guildStatusRoleFilter: Exposes CRUD operations for the GuildStatusRoleFilter model.
prisma.guildStickyEmbedField: Exposes CRUD operations for the GuildStickyEmbedField model.
prisma.guildStickyMessage: Exposes CRUD operations for the GuildStickyMessage model.
prisma.guildStickyMessageButton: Exposes CRUD operations for the GuildStickyMessageButton model.
prisma.guildStickyMessageEmbed: Exposes CRUD operations for the GuildStickyMessageEmbed model.
prisma.guildStickyMessageWebhook: Exposes CRUD operations for the GuildStickyMessageWebhook model.
prisma.kSCurrentlyLive: Exposes CRUD operations for the KSCurrentlyLive model.
prisma.kSCustomMessage: Exposes CRUD operations for the KSCustomMessage model.
prisma.kSEmbedField: Exposes CRUD operations for the KSEmbedField model.
prisma.kSGiftedSubRole: Exposes CRUD operations for the KSGiftedSubRole model.
prisma.kSLeaderBoardRole: Exposes CRUD operations for the KSLeaderBoardRole model.
prisma.kSLeaderBoardSyncRole: Exposes CRUD operations for the KSLeaderBoardSyncRole model.
prisma.kSMessageButton: Exposes CRUD operations for the KSMessageButton model.
prisma.kSMessageEmbed: Exposes CRUD operations for the KSMessageEmbed model.
prisma.kSMessageWebhook: Exposes CRUD operations for the KSMessageWebhook model.
prisma.kSRoleWithUsers: Exposes CRUD operations for the KSRoleWithUsers model.
prisma.kSStatsChannelId: Exposes CRUD operations for the KSStatsChannelId model.
prisma.kickStreamer: Exposes CRUD operations for the KickStreamer model.
prisma.member: Exposes CRUD operations for the Member model.
prisma.r2Storage: Exposes CRUD operations for the R2Storage model.
prisma.r2StorageGuild: Exposes CRUD operations for the R2StorageGuild model.
prisma.rSCurrentlyLive: Exposes CRUD operations for the RSCurrentlyLive model.
prisma.rSCustomMessage: Exposes CRUD operations for the RSCustomMessage model.
prisma.rSEmbedField: Exposes CRUD operations for the RSEmbedField model.
prisma.rSMessageButton: Exposes CRUD operations for the RSMessageButton model.
prisma.rSMessageEmbed: Exposes CRUD operations for the RSMessageEmbed model.
prisma.rSMessageWebhook: Exposes CRUD operations for the RSMessageWebhook model.
prisma.rSStatsChannelId: Exposes CRUD operations for the RSStatsChannelId model.
prisma.rumbleStreamer: Exposes CRUD operations for the RumbleStreamer model.
prisma.sentDrop: Exposes CRUD operations for the SentDrop model.
prisma.tSCurrentlyLive: Exposes CRUD operations for the TSCurrentlyLive model.
prisma.tSCustomMessage: Exposes CRUD operations for the TSCustomMessage model.
prisma.tSEmbedField: Exposes CRUD operations for the TSEmbedField model.
prisma.tSMessageButton: Exposes CRUD operations for the TSMessageButton model.
prisma.tSMessageEmbed: Exposes CRUD operations for the TSMessageEmbed model.
prisma.tSMessageWebhook: Exposes CRUD operations for the TSMessageWebhook model.
prisma.tSStatsChannelId: Exposes CRUD operations for the TSStatsChannelId model.
prisma.tTSCurrentlyLive: Exposes CRUD operations for the TTSCurrentlyLive model.
prisma.tTSCustomMessage: Exposes CRUD operations for the TTSCustomMessage model.
prisma.tTSEmbedField: Exposes CRUD operations for the TTSEmbedField model.
prisma.tTSMessageButton: Exposes CRUD operations for the TTSMessageButton model.
prisma.tTSMessageEmbed: Exposes CRUD operations for the TTSMessageEmbed model.
prisma.tTSMessageWebhook: Exposes CRUD operations for the TTSMessageWebhook model.
prisma.tTSStatsChannelId: Exposes CRUD operations for the TTSStatsChannelId model.
prisma.team: Exposes CRUD operations for the Team model.
prisma.teamMember: Exposes CRUD operations for the TeamMember model.
prisma.tiktokStreamer: Exposes CRUD operations for the TiktokStreamer model.
prisma.twitchStreamer: Exposes CRUD operations for the TwitchStreamer model.
prisma.user: Exposes CRUD operations for the User model.
prisma.userActiveGuildSubscription: Exposes CRUD operations for the UserActiveGuildSubscription model.
prisma.userBirthday: Exposes CRUD operations for the UserBirthday model.
prisma.userGettingStarted: Exposes CRUD operations for the UserGettingStarted model.
prisma.userKickAccount: Exposes CRUD operations for the UserKickAccount model.
prisma.userKickAccountSubscribedTo: Exposes CRUD operations for the UserKickAccountSubscribedTo model.
prisma.userLinkedRoles: Exposes CRUD operations for the UserLinkedRoles model.
prisma.userMediaShare: Exposes CRUD operations for the UserMediaShare model.
prisma.userMediaSharePermissions: Exposes CRUD operations for the UserMediaSharePermissions model.
prisma.userMediaShareSettings: Exposes CRUD operations for the UserMediaShareSettings model.
prisma.userNotificationData: Exposes CRUD operations for the UserNotificationData model.
prisma.userNotifications: Exposes CRUD operations for the UserNotifications model.
prisma.userPremium: Exposes CRUD operations for the UserPremium model.
prisma.userRumbleAccount: Exposes CRUD operations for the UserRumbleAccount model.
prisma.userSession: Exposes CRUD operations for the UserSession model.
prisma.userTwitchAccount: Exposes CRUD operations for the UserTwitchAccount model.
prisma.yTSCurrentlyLive: Exposes CRUD operations for the YTSCurrentlyLive model.
prisma.yTSCustomMessage: Exposes CRUD operations for the YTSCustomMessage model.
prisma.yTSEmbedField: Exposes CRUD operations for the YTSEmbedField model.
prisma.yTSMessageButton: Exposes CRUD operations for the YTSMessageButton model.
prisma.yTSMessageEmbed: Exposes CRUD operations for the YTSMessageEmbed model.
prisma.yTSMessageWebhook: Exposes CRUD operations for the YTSMessageWebhook model.
prisma.yTSStatsChannelId: Exposes CRUD operations for the YTSStatsChannelId model.
prisma.youtubeStreamer: Exposes CRUD operations for the YoutubeStreamer model.
Executes a prepared raw query and returns the number of affected rows.
Rest...values: any[]const result = await prisma.$executeRaw`UPDATE User SET cool = ${true} WHERE email = ${'user@email.com'};`
Read more in our docs.
Executes a raw query and returns the number of affected rows. Susceptible to SQL injections, see documentation.
Rest...values: any[]const result = await prisma.$executeRawUnsafe('UPDATE User SET cool = $1 WHERE email = $2 ;', true, 'user@email.com')
Read more in our docs.
Performs a prepared raw query and returns the SELECT data.
Rest...values: any[]const result = await prisma.$queryRaw`SELECT * FROM User WHERE id = ${1} OR email = ${'user@email.com'};`
Read more in our docs.
Performs a raw query and returns the SELECT data.
Susceptible to SQL injections, see documentation.
Rest...values: any[]const result = await prisma.$queryRawUnsafe('SELECT * FROM User WHERE id = $1 OR email = $2;', 1, 'user@email.com')
Read more in our docs.
Allows the running of a sequence of read/write operations that are guaranteed to either succeed or fail as a whole.
Optionaloptions: { Optionalisolationconst [george, bob, alice] = await prisma.$transaction([
prisma.user.create({ data: { name: 'George' } }),
prisma.user.create({ data: { name: 'Bob' } }),
prisma.user.create({ data: { name: 'Alice' } }),
])
Read more in our docs.
Optionaloptions: { OptionalisolationOptionalmaxOptionaltimeout?: number
Prisma Client ʲˢ
Type-safe database client for TypeScript & Node.js
Example
Read more in our docs.