<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>

          pg_graphqlPostgreSQL 的 GraphQL 支持

          聯(lián)合創(chuàng)作 · 2023-10-01 00:07

          pg_graphql 支持使用 GraphQL 查詢現(xiàn)有的 PostgreSQL 數(shù)據(jù)庫,提供了 SQL 模式 -> GraphQL 模式反射引擎和關(guān)聯(lián)的 GraphQL 查詢 -> SQL 查詢轉(zhuǎn)譯器,任何可以連接到 PostgreSQL 的編程語言都可以通過 GraphQL 查詢數(shù)據(jù)庫,而無需額外的服務(wù)器、進(jìn)程或庫。

          SQL 架構(gòu)

          create table account(
              id serial primary key,
              email varchar(255) not null,
              encrypted_password varchar(255) not null,
              created_at timestamp not null,
              updated_at timestamp not null
          );
          
          create table blog(
              id serial primary key,
              owner_id integer not null references account(id),
              name varchar(255) not null,
              description varchar(255),
              created_at timestamp not null,
              updated_at timestamp not null
          );
          
          create type blog_post_status as enum ('PENDING', 'RELEASED');
          
          create table blog_post(
              id uuid not null default uuid_generate_v4() primary key,
              blog_id integer not null references blog(id),
              title varchar(255) not null,
              body varchar(10000),
              status blog_post_status not null,
              created_at timestamp not null,
              updated_at timestamp not null
          );

          轉(zhuǎn)換為 GraphQL 模式,將每個(gè)表公開為一個(gè)可分頁的集合,其關(guān)系由外鍵定義。

          瀏覽 17
          點(diǎn)贊
          評(píng)論
          收藏
          分享

          手機(jī)掃一掃分享

          編輯 分享
          舉報(bào)
          評(píng)論
          圖片
          表情
          推薦
          點(diǎn)贊
          評(píng)論
          收藏
          分享

          手機(jī)掃一掃分享

          編輯 分享
          舉報(bào)
          <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>
                  插操视频| 久久99久久99久久99人受 | 成人mv高清在线观看 | 变态另类天堂 | 亚洲综合色吧 |