<kbd id="afajh"><form id="afajh"></form></kbd>
<strong id="afajh"><dl id="afajh"></dl></strong>
    <del id="afajh"><form id="afajh"></form></del>
        1. <th id="afajh"><progress id="afajh"></progress></th>
          <b id="afajh"><abbr id="afajh"></abbr></b>
          <th id="afajh"><progress id="afajh"></progress></th>

          Prisma構(gòu)建數(shù)據(jù)庫的 GraphQL 服務(wù)框架

          聯(lián)合創(chuàng)作 · 2023-09-19 18:55

          Prisma 是一個快速構(gòu)建 GraphQL 服務(wù)、REST API、數(shù)據(jù)庫服務(wù)的后端框架

          • 已支持 MySQL, PostgreSQL, MongoDB 等數(shù)據(jù)庫,其他流行數(shù)據(jù)庫正在開發(fā)中

          • 客戶端已支持 JavaScript, TypeScript, Flow, Go 等語言

          • 類型安全的數(shù)據(jù)庫訪問,包括過濾器、聚合、分頁和事務(wù)

          • 數(shù)據(jù)庫的實時事件系統(tǒng)以獲得有關(guān)數(shù)據(jù)庫事件的通知

          • 具有簡單SDL語法的聲明性數(shù)據(jù)建模和遷移

          Prisma

          示例代碼:

          const { prisma } = require('./generated/prisma-client')
          
          // A `main` function so that we can use async/await
          async function main() {
            // Create a new user with a new post
            const newUser = await prisma.createUser({
              name: 'Alice',
              posts: {
                create: { title: 'The data layer for modern apps' }
              }
            })
            console.log(`Created new user: ${newUser.name} (ID: ${newUser.id})`)
          
            // Read all users from the database and print them to the console
            const allUsers = await prisma.users()
            console.log(allUsers)
          
            // Read all posts from the database and print them to the console
            const allPosts = await prisma.posts()
            console.log(allPosts)
          }
          
          main().catch(e => console.error(e))

           

          瀏覽 16
          點贊
          評論
          收藏
          分享

          手機掃一掃分享

          編輯 分享
          舉報
          評論
          圖片
          表情
          推薦
          點贊
          評論
          收藏
          分享

          手機掃一掃分享

          編輯 分享
          舉報
          <kbd id="afajh"><form id="afajh"></form></kbd>
          <strong id="afajh"><dl id="afajh"></dl></strong>
            <del id="afajh"><form id="afajh"></form></del>
                1. <th id="afajh"><progress id="afajh"></progress></th>
                  <b id="afajh"><abbr id="afajh"></abbr></b>
                  <th id="afajh"><progress id="afajh"></progress></th>
                  亚洲人天堂 | 18禁麻豆 | 久久爽中文字 | 婷婷五月天色色 | 欧美一级视频在线观看 |