书栈网 · BookStack 本次搜索耗时 0.045 秒,为您找到 644 个相关结果.
  • 项目创建

    341 2022-02-28 《Ent v0.10 教程》
    项目创建 前提条件 安装 代码生成 创建测试案例 项目创建 本指南针对的是首次需要说明如何从零开始创建项目的用户。 在我们开始之前,请确保您的机器上满足了以下前提条件。 前提条件 Go Docker (可选) 在安装这些依赖后,创建项目目录并初始化Go模块: mkdir todo cd $_ go mod init tod...
  • 注解

    567 2021-09-30 《Ent v0.9 教程》
    注解 自定义表名 外键配置 注解 结构注解(Schema annotations) 允许附加元数据到结构对象(例如字段和边) 上面,并且将元数据注入到外部模板中。 注解是一种Go类型,它能进行JSON序列化(例如 struct, map 或 slice),并且需要实现Annotation 接口。 内置注解能够配置不同的存储驱动(例如 SQL),控...
  • Generating Schemas

    277 2021-09-30 《Ent v0.9 教程》
    Generating Schemas Introduction API Loading Printing Mutators Working with Edges Examples Caveats Generating Schemas Introduction To facilitate the creation of tooling ...
  • 引言

    引言 概述 它只是又一个 ORM 引言 概述 Schema 描述了图中一个实体类型的定义,如 User 或 Group , 并可以包含以下配置: 实体的字段 (或属性),如:User 的姓名或年龄。 实体的边 (或关系)。如:User 所属用户组,或 User 的朋友。 数据库相关的配置,如:索引或唯一索引。 下面是 Schema ...
  • Generating Protobufs

    Generating Protobufs with entproto Generating Protobufs with entproto As Ent and Protobuf schemas are not identical, we must supply some annotations on our schema to help entpro...
  • GraphQL 集成

    483 2021-09-30 《Ent v0.9 教程》
    GraphQL 集成 快速指南 Node API GQL 配置 分页 连接顺序 Usage Notes 样例 Defining order fields in ent/schema Define ordering types in GraphQL schema Adding orderBy argument to the pagination...
  • Quick Introduction

    Quick Introduction Setup A Go Environment Create Your First Schema Create Your First Entity Query Your Entities Add Your First Edge (Relation) Add Your First Inverse Edge (Bac...
  • Setting Up

    Setting Up Setting Up Let’s start by initializing a new Go module for our project: mkdir ent - grpc - example cd ent - grpc - example go mod init ent - grpc - example Ne...
  • Aggregation

    Aggregation Group By Group By Edge Having + Group By Aggregation Group By Group by name and age fields of all users, and sum their total age. package main import (...
  • Edges

    Edges Quick Summary To and From Relationship O2O Two Types O2O Same Type O2O Bidirectional O2M Two Types O2M Same Type M2M Two Types M2M Same Type M2M Bidirectional Edge...