zoukankan      html  css  js  c++  java
  • prisma graphql 集成timescaledb

    prisma 官方文档说明了因为支持pg 所以相关的timescaledb、cockroachdb 应该也是支持的
    但是测试之后timescaledb 支持cockroachdb有问题(事务处理模型支持有问题)

    初始化项目

    prisma init app

    修改docker-compose file

    version: '3'
    services:
      prisma:
        image: prismagraphql/prisma:1.13
        ports:
        - "4466:4466"
        environment:
          PRISMA_CONFIG: |
            port: 4466
            # uncomment the next line and provide the env var PRISMA_MANAGEMENT_API_SECRET=my-secret to activate cluster security
            # managementApiSecret: my-secret
            databases:
              default:
                connector: postgres
                host: postgres
                port: 5432
                user: postgres
                migrations: true
      postgres:
        image: timescale/timescaledb-postgis
        ports:
        - "5432:5432"
    

    启动&&deploy

    • 启动docker
    cd app
    docker-compose up -d
    • deploy schema
    prisma deploy

    运行效果


    参考资料

    https://www.prisma.io/
    http://www.timescale.com/

  • 相关阅读:
    内存对齐
    类和对象
    C++ 各种继承方式的类内存布局
    静态变量static
    程序内存布局
    String类
    C++与C的区别
    命名空间
    C
    D
  • 原文地址:https://www.cnblogs.com/rongfengliang/p/9459123.html
Copyright © 2011-2022 走看看