Prisma Client Go is an auto-generated and fully type-safe database client

Overview

Prisma Client Go

Typesafe database access for Go

Quickstart   •   Website   •   Docs   •   API reference   •   Blog   •   Slack   •   Twitter

Prisma Client Go is an auto-generated query builder that enables type-safe database access and reduces boilerplate. You can use it as an alternative to traditional ORMs such as gorm, xorm, sqlboiler and most database-specific tools.

It is part of the Prisma ecosystem. Prisma provides database tools for data access, declarative data modeling, schema migrations and visual data management.

NOTE: Prisma Client Go is currently offered under our early access program. There will be documented breaking changes with new releases.

Getting started

To get started, read our quickstart tutorial to add Prisma to your project in just a few minutes.

You also might want to read deployment tips and the full API reference.

Notes

The go client works slightly different than the normal Prisma tooling. When you're using the go client, whenever you see Prisma CLI commands such as prisma ..., you should always write go run github.com/prisma/prisma-client-go ... instead.

Contributing

We use conventional commits (also known as semantic commits) to ensure consistent and descriptive commit messages.

Security

If you have a security issue to report, please contact us at [email protected]

Issues
  • How to improve Timeout problems?

    How to improve Timeout problems?

    I keep getting a very very slow start whenever my server restarts or is redeployed. It used to be quick, but it takes too long these days and I worry!

    {
      "errors": [
        {
          "message": "could not find tracking information for order: Request failed: raw post: Post \"http://localhost:58197/\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)",
          "path": [
            "trackOrder"
          ]
        }
      ],
      "data": null
    }
    
    opened by darmie 30
  • Reduce code verbosity for conditional filters

    Reduce code verbosity for conditional filters

    Currently for database filters require to pass an actual integer value for filtering:

    
    var upperBound int
    
    users, err := r.Client.User.FindMany(
       db.User.NumPosts.GT(upperBound),
    ).Exec(ctx)
    

    When offering a variety of filtering options via an API, the user might or might not set certain filter options (equals, gt, gte, lt, lte, .... ). These filter options are then nil in golang.

    Currently I have to check all possible combinations of filter options and write the corresponding query to my database which leads to huge repeated code.

    tl;dr: Can we please have nullable filters where we can just do:

    var equalsParam *int
    var gtParam *int
    var gteParam *int
    var ltParam *int
    var lteParam *int
    
    users, err := r.Client.User.FindMany(
       db.User.NumPosts.Equals(equalsParam),
       db.User.NumPosts.GT(gtParam),
       db.User.NumPosts.GTE(gteParam),
       db.User.NumPosts.LT(ltParam),
       db.User.NumPosts.LTE(lteParam),
      ...
    ).Exec(ctx)
    

    nil ops could just be ignored and the query could throw an error when an impossible combination of operations is used.

    The same might be useful for String and Float filters.

    kind/feature 
    opened by maaft 26
  • Set intersect query with []string and .In()

    Set intersect query with []string and .In()

    I'm working with a model that includes a tags []string kind of thing, and I'd like to know if it's possible to do some specific intersections for queries.

    For reference, the feature I'm working on is open source so it may help to check the PR: https://github.com/openmultiplayer/web/pull/420/files

    The relevant part of the schema is here: https://github.com/openmultiplayer/web/blob/forum-categories/prisma/schema.prisma#L94-L128 notably the list of Tags in each Post model.

    It works great with these queries: https://github.com/openmultiplayer/web/pull/420/files#diff-3c9c79132aaec9a342a9567721f83d4d8b968069440955ebdbf80e89bd31b1b1R155-R183 if you specify one or many tags in the arguments, you get any post that has any of the specified tags.

    So, let's say I have 3 posts

    1. tagged "Food"
    2. tagged "Music"
    3. tagged "Food" and "Music"

    When I query "food,music" I get post 1 and 2 but not post 3

    When I query "food" I get post 1 but not post 3

    When I query "music" I get post 2 but not post 3

    So it seems posts with multiple tags cannot be queried with my approach.

    Is there a good way of doing this with the current Go API? Or do I have to go to raw SQL for this.

    Thanks!

    bug/2-confirmed kind/bug 
    opened by Southclaws 17
  • Build ARM compatible CLI binaries

    Build ARM compatible CLI binaries

    I've recently switched to an M1 mac and the currently binaries provided are not compatible with this chipset.

    I do not know of the best solution for this as GitHub does not yet provide runners (https://github.com/actions/virtual-environments/issues/2187) so cross compilation is probably the only real possibility unless someone on the Prisma team would be willing to compile and publish the binaries themselves.

    From having a look at the pkg README it sounds like it should be possible with something like the following command however I have not tested it.

    npx pkg -t node17-darwin-arm64 --no-bytecode --public-packages "*" --public node_modules/prisma
    

    This is relevant for Prisma Client Python as there is work being done to support ARM compiled engines: https://github.com/RobertCraigie/prisma-client-py/pull/233

    opened by RobertCraigie 14
  • Return multiple things at once

    Return multiple things at once

    Assuming we have the following datamodel:

    model Post {
      id     ID      @id
      title  String
      author User
    }
    
    model User {
      id    ID     @id
      name  String
      posts Post[]
    }
    

    The goal is to fetch multiple things at once, e.g. a user with his posts. The main problem is that Go can't return more struct fields dynamically, but we still want a (mostly) type safe solution.

    My proposal:

    Photon generates structs with all relations:

    type User struct {
      ID    string
      Name  string
      Posts []Post
    }
    

    Fetch just a user:

    user, err := photon.User.FindOne.Where(
      photon.User.Email.Equals("[email protected]"),
    ).Exec(ctx)
    
    // user.Posts == nil
    // len(user.Posts) == 0
    

    Fetch a user and their posts:

    user, err := photon.User.FindOne.Where(
      photon.User.Email.Equals("[email protected]"),
    ).With(
      photon.User.Posts.Limit(10),
    ).Exec(ctx)
    
    // user.Posts will contain the user's posts with a limit of 10
    

    Thanks to @robojones for the .With(...) syntax idea.

    Feedback or other approaches (even if they're completely different) are very welcome!

    kind/feedback 
    opened by steebchen 14
  • request failed: raw post: Post

    request failed: raw post: Post "/": unsupported protocol scheme ""

    I'm having this error with github.com/prisma/prisma-client-go v0.9.0

    Here are my logs:

    debug: 2021/06/08 18:39:48 temp dir: /var/folders/7c/87mt5r7x74g7hndhbw1zd8tw0000gn/T/
    debug: 2021/06/08 18:39:48 unpacked at /var/folders/7c/87mt5r7x74g7hndhbw1zd8tw0000gn/T/prisma/binaries/engines/adf5e8cba3daf12d456d911d72b6e9418681b28b/unpacked/prisma-query-engine-darwin in 75.200538ms
    debug: 2021/06/08 18:39:48 ensure query engine binary...
    debug: 2021/06/08 18:39:48 temp dir: /var/folders/7c/87mt5r7x74g7hndhbw1zd8tw0000gn/T/
    debug: 2021/06/08 18:39:48 expecting local query engine `prisma-query-engine-darwin` or `prisma-query-engine-darwin`
    debug: 2021/06/08 18:39:48 expecting global query engine `/var/folders/7c/87mt5r7x74g7hndhbw1zd8tw0000gn/T/prisma/binaries/engines/adf5e8cba3daf12d456d911d72b6e9418681b28b/unpacked/prisma-query-engine-darwin` or `/var/folders/7c/87mt5r7x74g7hndhbw1zd8tw0000gn/T/prisma/binaries/engines/adf5e8cba3daf12d456d911d72b6e9418681b28b/unpacked/prisma-query-engine-darwin`
    debug: 2021/06/08 18:39:48 query engine found in global path
    debug: 2021/06/08 18:39:49 version check took 515.9406ms
    debug: 2021/06/08 18:39:49 using query engine at /var/folders/7c/87mt5r7x74g7hndhbw1zd8tw0000gn/T/prisma/binaries/engines/adf5e8cba3daf12d456d911d72b6e9418681b28b/unpacked/prisma-query-engine-darwin
    debug: 2021/06/08 18:39:49 ensure query engine took 516.078382ms
    debug: 2021/06/08 18:39:49 running query-engine on port 59575
    debug: 2021/06/08 18:39:49 starting engine...
    debug: 2021/06/08 18:39:49 connecting to engine...
    debug: 2021/06/08 18:39:49 prisma engine payload: `{}`
    debug: 2021/06/08 18:39:49 could not connect; retrying...
    {"timestamp":"Jun 08 18:39:49.377","level":"INFO","fields":{"message":"Starting a postgresql pool with 13 connections."},"target":"quaint::pooled","span":{"features":"[]","url":"\"postgres://[email protected]:5432/REDACTED\"","name":"exec_loader"},"spans":[{"name":"listen"},{"features":"[]","url":"\"postgres://[email protected]:5432/REDACTED\"","name":"exec_loader"}]}
    debug: 2021/06/08 18:39:49 prisma engine payload: `{}`
    debug: 2021/06/08 18:39:49 could not connect; retrying...
    debug: 2021/06/08 18:39:49 prisma engine payload: `{}`
    debug: 2021/06/08 18:39:49 could not connect; retrying...
    debug: 2021/06/08 18:39:49 prisma engine payload: `{}`
    debug: 2021/06/08 18:39:49 could not connect; retrying...
    debug: 2021/06/08 18:39:49 prisma engine payload: `{}`
    debug: 2021/06/08 18:39:49 could not connect; retrying...
    debug: 2021/06/08 18:39:49 prisma engine payload: `{}`
    debug: 2021/06/08 18:39:49 could not connect; retrying...
    debug: 2021/06/08 18:39:49 prisma engine payload: `{}`
    debug: 2021/06/08 18:39:49 could not connect; retrying...
    debug: 2021/06/08 18:39:50 prisma engine payload: `{}`
    debug: 2021/06/08 18:39:50 could not connect; retrying...
    debug: 2021/06/08 18:39:50 prisma engine payload: `{}`
    debug: 2021/06/08 18:39:50 could not connect; retrying...
    debug: 2021/06/08 18:39:50 prisma engine payload: `{}`
    debug: 2021/06/08 18:39:50 could not connect; retrying...
    debug: 2021/06/08 18:39:50 prisma engine payload: `{}`
    debug: 2021/06/08 18:39:50 could not connect; retrying...
    debug: 2021/06/08 18:39:50 prisma engine payload: `{}`
    debug: 2021/06/08 18:39:50 could not connect; retrying...
    debug: 2021/06/08 18:39:50 prisma engine payload: `{}`
    debug: 2021/06/08 18:39:50 could not connect; retrying...
    debug: 2021/06/08 18:39:50 prisma engine payload: `{}`
    debug: 2021/06/08 18:39:50 could not connect; retrying...
    debug: 2021/06/08 18:39:50 prisma engine payload: `{}`
    debug: 2021/06/08 18:39:50 could not connect; retrying...
    debug: 2021/06/08 18:39:50 prisma engine payload: `{}`
    debug: 2021/06/08 18:39:50 could not connect; retrying...
    debug: 2021/06/08 18:39:51 prisma engine payload: `{}`
    debug: 2021/06/08 18:39:51 could not connect; retrying...
    debug: 2021/06/08 18:39:51 prisma engine payload: `{}`
    debug: 2021/06/08 18:39:51 could not connect; retrying...
    {"timestamp":"Jun 08 18:39:51.164","level":"INFO","fields":{"message":"Started http server on http://127.0.0.1:59575"},"target":"query_engine::server","span":{"name":"listen"},"spans":[{"name":"listen"}]}
    debug: 2021/06/08 18:39:51 prisma engine payload: `{}`
    debug: 2021/06/08 18:39:51 [timing] query engine raw request took 2.983126ms
    debug: 2021/06/08 18:39:51 [timing] elapsed: 97µs
    debug: 2021/06/08 18:39:51 [timing] just http: 2.886126ms
    debug: 2021/06/08 18:39:51 [timing] http percentage: 96.75%
    debug: 2021/06/08 18:39:51 connecting took 2.411555421s
    debug: 2021/06/08 18:39:51 connected.
    debug: 2021/06/08 18:39:51 disconnecting...
    debug: 2021/06/08 18:39:51 disconnected.
    
    

    Making a query results in the following error:

    debug: 2021/06/08 18:18:22 [timing] building "44.26µs"
    debug: 2021/06/08 18:18:22 prisma engine payload: `{"query":"query {result: findFirstUser(where:{AND:[{emailAddress:{equals:\"[email protected]\",}},{role:{equals:\"PATIENT\",}},],},) {id createdAt role firstName lastName accessToken password emailAddress metadata phoneNumber updatedAt }}","variables":{}}`
    debug: 2021/06/08 18:18:22 [timing] TOTAL "143.224µs"
    
    
    ERRO[0024] Error querying email [email protected] due to request failed: raw post: Post "/": unsupported protocol scheme ""
    

    Project Structure (-if that helps)


    main.go

    package main 
    
    import (
    "com.coolestapp/intheplanet/prisma/db"
    // A bunch of stuff
    )
    // Starts DB Connection for Prisma Engine
    func init() {
    	prismaClient := db.NewClient()
    	if err := prismaClient.Prisma.Connect(); err != nil {
    		panic(err)
    	}
    
    	defer func() {
    		if err := prismaClient.Prisma.Disconnect(); err != nil {
    			panic(err)
    		}
    	}()
    }
    
    func main() {
    	conf := configs.ApplicationConfig()
    
    	app := fiber.New(conf)
    
    	app.Use(pprof.New())
    
            // Other unimportant stuff
    
    	utils.StartServer(app) // Starts my server
    }
    
    

    controllers/users.go - where I'm actually making the query

    // imports and everything
    
    var prismaClient = db.NewClient()
    var ctx = context.Background()
    
    // More funcs
    
    func GetPatientByEmail(c *fiber.Ctx) error {
    
    	emailInfo := &patient.PatientByEmailQuery{}
    
    	if err := c.BodyParser(emailInfo); err != nil {
    		return c.Status(fiber.StatusBadRequest).JSON(fiber.Map{
    			"error":   true,
    			"message": err.Error(),
    		})
    	}
    
    	patient, err := prismaClient.User.FindFirst(
    		db.User.EmailAddress.Equals(emailInfo.EmailAddress),
    		db.User.Role.Equals(db.ROLEPATIENT),
    	).Exec(ctx)
    	if err != nil {
    		logger.Errorf("Error querying email %s due to %v", emailInfo.EmailAddress, err)
    		return c.Status(fiber.StatusInternalServerError).JSON(fiber.Map{
    			"errror":  true,
    			"message": err.Error(),
    		})
    	}
    	return c.JSON(fiber.Map{
    		"error":   false,
    		"message": nil,
    		"patient": patient,
    	})
    }
    

    I had deleted the prisma folder as mentioned in https://github.com/prisma/prisma-client-go/issues/448#issuecomment-808409412 and run generate afterwards

    opened by TheBeachMaster 13
  • request failed: raw post

    request failed: raw post

    Trying to execute a createOne:

    request failed: raw post: Post "http://localhost:38321/": dial tcp 127.0.0.1:38321: connect: connection refused
    

    My code:

    _, err := m.store.dbClient.PonosJob.CreateOne(
    		db.PonosJob.ID.Set([]byte(job.ID)),
    		db.PonosJob.Payload.Set(job.Payload),
    		db.PonosJob.Queue.Link(db.PonosJobQueue.ID.Equals([]byte(job.QueueID))),
    		db.PonosJob.ScheduledAt.Set(time.Now()),
    		db.PonosJob.CreatedAt.Set(time.Now()),
    	).Exec(m.store.ctx)
    

    Let me know if you need anything else

    opened by paulm17 13
  • Setting db provider url at runtime

    Setting db provider url at runtime

    First, thank you for all of your help!

    I am trying to understand the best way to integrate prisma into my project. Right now I have a separate repo with the schema and built clients. This allows different services to import the clients (typescript/golang). One thing I cant figure out is if it is possible to set the provider url at runtime. So I can switch between dev/prod envs. Is this possible and a reasonable approach? Or should I generate a new client from the schema for each package/env?

    opened by tarrencev 12
  • The method updateOne returns FieldNotFoundError.

    The method updateOne returns FieldNotFoundError.

    I am working with Echo, the web framework, MariaDB, and Prisma 2.
    Exercising CRUD simple posts, I encountered the problem when i update one post.

    I have let route "post/:id", which makes the post be updated. And uri parameter is id, such as 1, 2, 3
    In Echo framework, uri parameters can be accessed with c.Param("id").
    I triggered POST request with JSON object which includes title, and description as desc.
    But the terminal said the error pql error: Error in query graph construction: QueryParserError(QueryParserError { path: QueryPath { segments: ["Mutation", "updateOnePost"] }, error_kind: FieldNotFoundError }).

    I have predicted that if i launch post request to /posts/3, then title and content in post with id 3 should be changed, but not.

    I am going to attach Prisma schema code, echo request handler code, and JSON request body.
    I am using MariaDB, not PostgreSQL.

    model post {
      id        Int      @id @default(autoincrement())
      createdAt DateTime @default(now())
      updatedAt DateTime
      title     String
      published Boolean
      desc      String?
    
    type Post struct {
    	Title string `json:"title"`
    	Desc  string `json:"desc"`
    }
    var client *db.PrismaClient = db.NewClient()
    var ctx context.Context
    
    func init() {
    	ctx = context.Background()
            if err := client.Connect(); err != nil {
    		log.Panicln(err)
    	}
    }
    // UpdatePost Modifies a Post Being Already Created
    func UpdatePost(c echo.Context) error {
    	p := new(Post)
    	if err := c.Bind(p); err != nil {
    		log.Println(err.Error())
    		return c.JSON(http.StatusBadRequest, echo.Map{
    			"status": "fail",
    			"msg":    "Server Error",
    		})
    	}
    
    	id, err := strconv.Atoi(c.Param("id"))
    	if err != nil {
    		log.Println(err.Error())
    		return c.JSON(http.StatusBadRequest, echo.Map{
    			"status": "fail",
    			"msg":    "Server Error",
    		})
    	}
    
    	post, err := client.Post.FindOne(
    		db.Post.ID.Equals(id),
    	).Update(
    		db.Post.UpdatedAt.Set(time.Now()),
    		db.Post.Title.Set(p.Title),
    		db.Post.Published.Set(true),
    		db.Post.Desc.Set(p.Desc),
    	).Exec(ctx)
    	if err != nil {
    		log.Println(err.Error())
    		return c.JSON(http.StatusBadRequest, echo.Map{
    			"status": "fail",
    			"msg":    "Server Error",
    		})
    	}
    
    	str, err := json.MarshalIndent(post, "", " ")
    	if err != nil {
    		log.Println(err.Error())
    		return c.JSON(http.StatusBadRequest, echo.Map{
    			"status": "fail",
    			"msg":    "Server Error",
    		})
    	}
    	return c.JSON(http.StatusOK, echo.Map{
    		"status":         "OK",
    		"content-length": len(str),
    		"msg":            "The Post was modified as You Want",
    	})
    }
    
    {
        "title" : "Example Title Edited",
        "desc": "Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat."
    }
    

    the properties id, and createdAt is not required when creating.
    I have installed prisma-client-go latest version many times, and Echo version is v4.

    What is the problem?

    bug/0-unknown kind/bug 
    opened by quavious 10
  • .env file not being loaded at runtime

    .env file not being loaded at runtime

    Hello! I'm getting this error when trying to create a db connection:

    {
       "is_panic":false,
       "message":"\u001b[1;91merror\u001b[0m: \u001b[1mEnvironment variable not found: DATABASE_URL.\u001b[0m\n  \u001b[1;94m-->\u001b[0m  \u001b[4mschema.prisma:3\u001b[0m\n\u001b[1;94m   | \u001b[0m\n\u001b[1;94m 2 | \u001b[0m    provider = \"mysql\"\n\u001b[1;94m 3 | \u001b[0m    url      = \u001b[1;91menv(\"DATABASE_URL\")\u001b[0m\n\u001b[1;94m   | \u001b[0m\n\nValidation Error Count: 1",
       "meta":{
          "full_error":"\u001b[1;91merror\u001b[0m: \u001b[1mEnvironment variable not found: DATABASE_URL.\u001b[0m\n  \u001b[1;94m-->\u001b[0m  \u001b[4mschema.prisma:3\u001b[0m\n\u001b[1;94m   | \u001b[0m\n\u001b[1;94m 2 | \u001b[0m    provider = \"mysql\"\n\u001b[1;94m 3 | \u001b[0m    url      = \u001b[1;91menv(\"DATABASE_URL\")\u001b[0m\n\u001b[1;94m   | \u001b[0m\n\nValidation Error Count: 1"
       },
       "error_code":"P1012"
    }
    

    DATABASE_URL is from a .env file at the same level as my schema. I am able to create & run migrations with the migrate command. Does the Go client not yet support .env files?

    Schema:

    datasource db {
        provider = "mysql"
        url      = env("DATABASE_URL")
        output   = "prisma-gen"
    }
    
    generator db {
        provider = "go run github.com/prisma/prisma-client-go"
        package  = "prisma"
        output   = "prisma"
    }
    
    model User {
        id         String  @id @default(cuid())
        email      String  @unique
        password   String
        isVerified Boolean
    }
    
    kind/feature team/client 
    opened by hi019 10
  • How to handle relations in query resolvers

    How to handle relations in query resolvers

    Hello there!

    I have a prisma schema with relations, similar to this one

    model User {
      id              String      @id @default(cuid())
      username        String      @unique
    
      projects        Project[]
    }
    
    model Project {
      id              String   @id @default(cuid())
      owner           User?    @relation(fields: [userId], references: [id])
      userId          String?
      name            String
    }
    

    with the following resolver function (via gqlgen):

    func (r *queryResolver) Users(ctx context.Context, after *model.UserWhereUniqueInput, before *model.UserWhereUniqueInput, first *int, last *int) ([]*model.User, error) {
    	users, err := r.Client.User.FindMany().Exec(ctx)
    
    	if err != nil {
    		return nil, err
    	}
    
    	retUsers := make([]*model.User, len(users))
    
    	for i, user := range users {
    		retUsers[i] = &model.User{
    			ID:        user.ID,
    			Username:  user.Username,,
    			Projects:  user.Projects,
    		}
    	}
    
    	return retUsers, err
    }
    

    The Problem is that Projects and user.Projects are of different types ( []*model.Project and []db.ProjectModel ).

    Do I have to iterate again over all projects in the user loop and make a client request/exec each time or can i bundle all of the requests/exec's?

    kind/feedback 
    opened by marcown 10
  • Stripped json

    Stripped json

    When working on Select statement I noticed that the returned json contains a lot of empty fields. Perhaps not a problem, but I like my json neat and tidy.

    For instance, when using Select I get this:

    bild

    i.e. overview, still etc are null, empty strings etc.

    I've created an ExecJson-function (to be used instead of Exec) that returns the following json

    bild

    The one downside is that since we retrieve the data as json we can't do any manipulation (unless, of course, we unmarshal it, but that negates the whole thing), but if we just want to retrieve slim data this might be an idea?

    opened by fragdance1 2
  • Linking multiple many-to-many in one go

    Linking multiple many-to-many in one go

    In the typescript client we are able to do something like: bild

    Where we send in an array of models to respective field (genre, cast etc).

    I saw some discussion in #207 but it doesn't really apply to my needs.

    What I've done locally is to add a statement Connect that takes and array of the correct model and creates links automatically.

    This is how I use it: First create all the arrays (for instance genre) bild

    Then send it in a Connect statement

    bild

    Is this something that could be of use?

    opened by fragdance1 3
  • Error in build docker image with prisma and go

    Error in build docker image with prisma and go

    Hi everyone. I am using prisma in golang and i have issue prisma/db is not in GOROOT. issue is showing on build docker image in gitlab.

    look the image bottom for the detail issue image

    opened by nurrohim11 1
  • Prisma Client Go will not be Officially Maintained any more

    Prisma Client Go will not be Officially Maintained any more

    Hey everyone,

    After a lot of consideration, we've decided to stop the development on the Go Client. The Go client has unfortunately not seen the growth we were hoping for. To understand this decision a bit better, I'm sharing a chart that shows the number of installs over the last 12 months:

    image

    As you can see, there's been stable adoption, but not much growth.

    This doesn't mean that the Go client isn't useful or that the Go Client is a bad idea. We've just learned that the Go Client won't grow by itself. We would need to invest more resources to reach the kind of adoption we would need to sustain the development. Given our priorities for the next year, the Go Client just didn't make the cut.

    I'd like to take a moment to thank @steebchen for his work on the Go client for the last 2 years. He's been working tirelessly on answering questions, fixing bugs and implementing the features you've been asking for.

    I've added an FAQ below, but I'll leave this thread open to answer any additional questions you might have. We're sorry for the inconvenience this may cause you.

    FAQ

    When does the development stop?

    We are stopping the development of the Go Client immediately.

    Will critical issues and bugs be fixed?

    Unfortunately, we won’t have any resources to fix any outstanding or upcoming issues with the Go Client. Community members are more than welcome to fork the repo and continue the development of the Go Client on their own (as a reference, you can look at the Python Client which has been developed from scratch by a community member as well). If anyone is interested in that, we are happy to help with the first steps in adopting and distributing.

    What is going to happen to the repo?

    This repository will remain in place as a point of reference.

    Will you change your mind in the future and pick up the development again?

    Possibly. As we grow larger and reach more enterprises, the Go ecosystem is likely to become more relevant again. The type of Go Client we offer then may look different than the current one though.

    opened by matthewmueller 39
  • Panic exit after running generate

    Panic exit after running generate

    Hi folks. We're currently using Prisma with our nodejs project, but our Go services use static queries that may drift in the future. We'd like to use the Prisma schema as a source of truth and integrate with the code generated from this library. However, can't seem to find a way around the panic error I'm receiving after using the same schema used in our node service.

    The error I'm receiving:

    $ go run github.com/prisma/prisma-client-go generate
    Prisma schema loaded from schema.prisma
    Error:
                    SpatialRefSys spatialRefSysActions
    }
     from file client.gotpl: 230242:28: expected ';', found npx (and 91 more errors)
    exit status 1
    
    
    
    panic: could not run [generate]: exit status 1
    
    goroutine 1 [running]:
    main.main()
            /Users/me/Development/go/pkg/mod/github.com/prisma/[email protected]/main.go:29 +0x40c
    exit status 2
    

    From what I can tell, the table doesn't actually matter. The error will always return the last table in the schema if I comment out things.

    Not sure if it's helpful, but there are 63 tables and nearly 1000 lines of code in the schema. This is at the top of the schema if that helps with debugging:

    generator client {
      output = "db_gen.go"
      package = "db"
      provider      = "go run github.com/prisma/prisma-client-go"
      // binaryTargets = ["native"]
      // provider      = "prisma-client-js"
    }
    
    datasource db {
      provider = "postgresql"
      url      = env("DATABASE_URL")
    }
    

    Thanks for taking a look!

    bug/1-unconfirmed kind/bug 
    opened by kacy 6
Releases(v0.16.1)
  • v0.16.1(May 11, 2022)

    v0.16.1

    Fix a query builder order which prevents flaky mock testing. It does not affect production queries.

    Major changes

    • fix(mocks): build fields in deterministic order (#742) @robojones

    Changes

    • ci(workflows): run on push instead of pull_request (#739) @steebchen
    • chore(deps): bump amannn/action-semantic-pull-request from 4.2.0 to 4.4.0 (#736) @dependabot
    • chore(deps): bump golang from 1.18.0 to 1.18.1 in /test/integration (#734) @dependabot
    • chore(deps): bump amannn/action-semantic-pull-request from 4.4.0 to 4.5.0 (#741) @dependabot
    • ci(workflows): run on PR for third party repo PRs (#745) @steebchen

    Contributors

    @dependabot, @dependabot[bot], @robojones and @steebchen

    Source code(tar.gz)
    Source code(zip)
  • v0.15.0(May 2, 2022)

    v0.15.0

    Upgrade Prisma to 3.13.0

    Major changes

    • chore(prisma): upgrade prisma to 3.13.0 (#737) @steebchen

    Changes

    • chore(deps): bump actions/setup-go from 2 to 3 (#733) @dependabot

    Contributors

    @dependabot, @dependabot[bot] and @steebchen

    Source code(tar.gz)
    Source code(zip)
  • v0.14.0(Apr 6, 2022)

    v0.14.0

    Upgrade prisma to 3.12.0

    Changes

    • chore(deps): bump amannn/action-semantic-pull-request from 4.0.1 to 4.1.0 (#723) @dependabot
    • chore(deps): bump amannn/action-semantic-pull-request from 4.1.0 to 4.2.0 (#724) @dependabot
    • chore(deps): bump golang from 1.17.6 to 1.17.7 in /test/integration (#725) @dependabot
    • chore(deps): bump golang from 1.17.7 to 1.17.8 in /test/integration (#728) @dependabot
    • chore(deps): bump actions/checkout from 2.4.0 to 3 (#726) @dependabot
    • chore(deps): bump github.com/stretchr/testify from 1.7.0 to 1.7.1 (#729) @dependabot
    • chore(deps): bump actions/cache from 2 to 3 (#731) @dependabot
    • chore(deps): bump golang from 1.17.8 to 1.18.0 in /test/integration (#730) @dependabot
    • chore(prisma): upgrade prisma to 3.12.0 (#732) @steebchen

    Contributors

    @dependabot, @dependabot[bot] and @steebchen

    Source code(tar.gz)
    Source code(zip)
  • v0.13.1(Feb 4, 2022)

    v0.13.1

    Query builder bugfix patch release

    Changes

    • ci(release-drafter): adapt template (#716) @steebchen
    • fix(builder): ignore model operations on unique check (#722) @steebchen
    • chore(deps): bump amannn/action-semantic-pull-request from 3.6.0 to 4.0.1 (#720) @dependabot
    • test(basic): add complex and/or query with re-used fields (#721) @steebchen

    Contributors

    @dependabot, @dependabot[bot] and @steebchen

    Source code(tar.gz)
    Source code(zip)
  • v0.13.0(Jan 19, 2022)

    v0.13.0

    JSON filtering, FTS order by relevance, bugfixes, bump Prisma CLI, docs

    🌟 Help us spread the word about Prisma by starring the repo ☝️ or tweeting about the release.

    Major changes

    • Add/fix json filtering
    • Add full text search by relevance

    Changes

    • refactor: use io and os instead of io/ioutil (#653) @s-takehana
    • docs(readme): add badges (#654) @s-takehana
    • chore(idea): use new log env var in test config (#656) @steebchen
    • fix(builder): re-use fields, remove AND wrapping (#657) @steebchen
    • test(types/json): add json filter tests (#659) @steebchen
    • feat(proxy): add data proxy engine implementation & test (#598) @steebchen
    • chore(project): enable dependabot version updates (#641) @s-takehana
    • feat(prisma): upgrade prisma to 3.4.0 (#671) @steebchen
    • chore(deps): bump golang from 1.16 to 1.17.2 in /test/integration (#672) @dependabot
    • chore(deps): bump github.com/stretchr/testify from 1.4.0 to 1.7.0 (#675) @dependabot
    • ci(e2e): enable verbose logging (#677) @steebchen
    • fix(proxy): introduce retryableRequest, minor fixes (#678) @steebchen
    • feat(client): add order by relevance (#660) @steebchen
    • chore(deps): bump actions/checkout from 1 to 2.4.0 (#673) @dependabot
    • chore(deps): bump amannn/action-semantic-pull-request from 1.1.1 to 3.4.6 (#674) @dependabot
    • chore(deps): bump github.com/shopspring/decimal from 1.2.0 to 1.3.1 (#676) @dependabot
    • chore(deps): bump github.com/joho/godotenv from 1.3.0 to 1.4.0 (#679) @dependabot
    • fix(builder): remove log (#683) @steebchen
    • docs(reference/json): add json filter docs (#682) @steebchen
    • fix(builder): wrap order by inputs in list (#685) @steebchen
    • chore(deps): bump golang from 1.17.2 to 1.17.3 in /test/integration (#680) @dependabot
    • refactor(tests): replace word 'fail' in tests (#686) @steebchen
    • fix(generator): don't generate gitignores w/o binaries (#687) @steebchen
    • chore(idea): set new log variable in e2e test config (#689) @steebchen
    • docs(proxy): add data proxy docs (#690) @steebchen
    • docs(features): add case sensitivity docs (#691) @steebchen
    • docs(features): add index readme (#692) @steebchen
    • test(mongodb): add mongodb integration tests (#693) @steebchen
    • feat(generator): export query builder interfaces (#694) @steebchen
    • test(generator): skip generation on db push (#695) @steebchen
    • chore(deps): bump golang from 1.17.3 to 1.17.4 in /test/integration (#700) @dependabot
    • chore(deps): bump amannn/action-semantic-pull-request from 3.4.6 to 3.5.0 (#703) @dependabot
    • docs(readme): add note about maintenance status (#708) @matthewmueller
    • chore(deps): bump golang from 1.17.4 to 1.17.5 in /test/integration (#701) @dependabot
    • chore(prisma): upgrade prisma to 3.7.0 (#709) @steebchen
    • docs(readme): adapt deprecation notice (#711) @nikolasburk
    • chore(deps): bump golang from 1.17.5 to 1.17.6 in /test/integration (#713) @dependabot
    • docs(contributing): add CONTRIBUTING.md and more READMEs (#710) @steebchen

    Contributors

    @dependabot, @dependabot[bot], @matthewmueller, @nikolasburk, @s-takehana and @steebchen

    Source code(tar.gz)
    Source code(zip)
  • v0.12.2(Oct 26, 2021)

    v0.12.2

    Patch release for v0.12, which fixes a bug related to query engine unpacking.

    Changes

    • fix(binaries): add engine version to db_gen for unpack (#652) @steebchen

    Contributors

    @steebchen

    Interested in providing feedback for the Go client?

    We would like to ask you a few questions and get your feedback about the Go client. We'll send merch along your away as a thank you. If you're interested, email me at [email protected] or join our public Slack and DM me.

    Source code(tar.gz)
    Source code(zip)
  • v0.12.1(Oct 26, 2021)

    v0.12.1

    Patch release for v0.12, which fixes a bug for query builder filters related to scalar lists.

    Changes

    • test(setup): update postgresql and mysql version (#645) @s-takehana
    • chore(project): use go version 1.16 (#639) @s-takehana
    • fix(logger): rename PHOTON_GO_LOG to PRISMA_CLIENT_GO_LOG (#647) @steebchen
    • fix(test): remove old arg (#648) @s-takehana
    • docs(test): update readme (#649) @s-takehana
    • fix(ast/transform): pick list filters separately (#650) @steebchen
    • fix(ast): introduce list read filters (#651) @steebchen

    Contributors

    @s-takehana and @steebchen

    Interested in providing feedback for the Go client?

    We would like to ask you a few questions and get your feedback about the Go client. We'll send merch along your away as a thank you. If you're interested, email me at [email protected] or join our public Slack and DM me.

    Source code(tar.gz)
    Source code(zip)
  • v0.12.0(Oct 20, 2021)

    v0.12.0

    Scalar list operations, docs improvements, minor fixes

    🌟 Help us spread the word about Prisma by starring the repo ☝️ or tweeting about the release.

    Major changes

    You can now filter and atomically update scalar lists with Prisma Client Go.

    Given the following Prisma schema:

    model User {
      id   Int      @id @default(autoincrement())
      name String
      pets String[]
    }
    

    You can filter pets with the following code:

    user, err := client.User.FindFirst(
    	db.User.Pets.HasSome([]string{"Fido", "Scooby"}),
    ).Exec(ctx)
    

    And when you add a new furry addition to your family, you can update your list with Push:

    user, err := client.User.FindUnique(
    	db.User.Name.Equals(1),
    ).Update(
    	db.User.Items.Push([]string{"Charlemagne"}),
    ).Exec(ctx)
    

    Learn more about how to use this new feature in our documentation. To dive deeper into the concept of scalar lists, you can read the guide on Working with scalar lists.

    Changes

    • refactor(engine): add qe.go (#595) @steebchen
    • refactor(generator): group binary related code (#596) @steebchen
    • refactor(generator): extract template and binary functions (#597) @steebchen
    • ci(test): introduce e2e tests (#599) @steebchen
    • docs: fix migration command (#601) @s-takehana
    • docs: fix example code (#607) @s-takehana
    • docs(find): fix example code (#609) @s-takehana
    • docs(fetch): fix example code (#614) @s-takehana
    • docs(introduction): fix example code (#613) @s-takehana
    • docs(filters): fix example code (#612) @s-takehana
    • refactor(ast): pick from many input type names (#617) @steebchen
    • docs(pagination): fix example code (#619) @s-takehana
    • docs(create): fix example code (#621) @s-takehana
    • docs(order-by): fix example code (#620) @s-takehana
    • feat(ast): add list read and write filters (#618) @steebchen
    • docs: use SortOrderAsc/SortOrderDesc (#622) @s-takehana
    • docs(update): fix example code (#623) @s-takehana
    • docs(upsert): fix example code (#625) @s-takehana
    • docs(delete): fix example code (#624) @s-takehana
    • docs(relations): fix example code (#626) @s-takehana
    • docs(transactions): fix example code (#628) @s-takehana
    • docs(raw): fix example code (#627) @s-takehana
    • docs(json): fix example code (#630) @s-takehana
    • docs(if-present-methods): fix example code (#631) @s-takehana
    • fix(templates): redundant type (#633) @s-takehana
    • docs(limitations): fix link (#632) @s-takehana
    • feat(engine): fail when client is disconnected (#634) @steebchen
    • docs(reference): add scalar list docs (#635) @steebchen
    • docs(reference): update scalar lists docs (#636) @steebchen
    • fix(logger): microsecond resolution (#638) @s-takehana
    • feat(prisma): upgrade prisma to 3.3.0 (#642) @steebchen

    Contributors

    @s-takehana and @steebchen

    Special shoutout to @s-takehana for all the useful PRs :)

    Interested in providing feedback for the Go client?

    We would like to ask you a few questions and get your feedback about the Go client. We'll send merch along your away as a thank you. If you're interested, email me at [email protected] or join our public Slack and DM me.

    Source code(tar.gz)
    Source code(zip)
  • v0.11.0(Sep 21, 2021)

    v0.11.0

    THIS RELEASE CONTAINS BREAKING CHANGES!

    Please read the release notes of Prisma 3.x https://github.com/prisma/prisma/releases/tag/3.0.1 which contains many different breaking changes, the primary one being referential actions which breaks previous behaviour. You might want to to checkout the upgrade path for referential actions. This release currently uses the latest Prisma version https://github.com/prisma/prisma/releases/tag/3.1.1.

    Note: This release currently does not support MongoDB.

    🌟 Help us spread the word about Prisma by starring the repo ☝️ or tweeting about the release.

    Major changes

    • Full text search

    Enable it in your Go project by adding the fullTextSearch preview feature.

    generator db {
       provider        = "go run github.com/prisma/prisma-client-go"
    +  previewFeatures = ["fullTextSearch"]
    }
    
    // Fetch all drafts with a title that contains the words fox or dog
    posts, _ := client.Post.FindMany(
      db.Post.Title.Search("fox | dog"),
      db.Post.Status.Equals("Draft"),
    ).Exec(context.Background())
    
    // Loop over the posts and print the title
    for _, post := range posts {
      fmt.Println(post.Title)
    }
    
    • Upgrade to prisma 3.1.1
    • Introduce referential actions
    • Refactor internals
    • Tons of bugfixes
    • Deprecate some query builder operations to streamline with the JS client ones

    Changes

    • fix(client): remove deprecated client methods [breaking change] (#526) @steebchen
    • ci(actions): enable on all pull requests (#529) @steebchen
    • fix(update): use correct model casing in update query (#530) @steebchen
    • docs(reference): rename incorrectly named page in readme (#540) @Looskie
    • docs(readme): add info about setting output folder and package name (#544) @hi019
    • docs(reference): adapt order by schema (#546) @steebchen
    • feat(prisma): upgrade prisma to 2.30.0 (#554) @steebchen
    • refactor(generator): [full dmmf] rewrite filters (#551) @steebchen
    • fix(generator): remove old transform methods (#558) @steebchen
    • feat(prisma): upgrade prisma to 2.30.2 (#559) @steebchen
    • feat(ast): introduce ast models (#560) @steebchen
    • fix(query): adapt filters deprecation comment (#561) @steebchen
    • chore(git): rename default branch from master to main (#566) @steebchen
    • feat(ast): add relation read filters (#567) @steebchen
    • fix(dmmf): remove old relation methods (#568) @steebchen
    • fix(mock): add ReturnsMany method for list operations (#571) @steebchen
    • feat(scalars): get scalars from dmmf (#574) @steebchen
    • feat(ast): add indexes (#575) @steebchen
    • fix(transform): adapt filter pick name (#576) @steebchen
    • test(fts): add test for full text search (#577) @steebchen
    • feat(prisma): upgrade prisma to 3.0.2 (#579) @steebchen
    • feat(enums): use internal prisma enums (#581) @steebchen
    • fix(mod): move no-op imports to main.go (#582) @steebchen
    • feat(ast): revert read relation filters (#583) @steebchen
    • feat(prisma): upgrade prisma to 3.1.1 (#584) @steebchen
    • fix(mod): revert "move no-op imports to main.go" (#585) @steebchen

    Contributors

    @Looskie, @hi019 and @steebchen

    Interested in providing feedback for the Go client?

    We would like to ask you a few questions and get your feedback about the Go client. We'll send merch along your away as a thank you. If you're interested, email me at [email protected] or join our public Slack and DM me.

    Source code(tar.gz)
    Source code(zip)
  • v0.10.0(Jul 7, 2021)

    v0.10.0

    Basic support for .env files + some minor bugfixes around transactions & postgres list fields

    🌟 Help us spread the word about Prisma by starring the repo ☝️ or tweeting about the release.

    Changes

    • fix(engine): recommend running generate on QE mismatch (#488) @steebchen
    • fix(transactions): return batch result for non-unique ops (#490) @steebchen
    • feat(lifecycle): load dot-env files before connecting (#494) @steebchen
    • fix(create): do not require list fields on create (#504) @steebchen
    • feat(prisma): upgrade to [email protected] (#506) @steebchen

    Contributors

    @steebchen

    Interested in providing feedback for the Go client?

    We would like to ask you a few questions and get your feedback about the Go client. We'll send merch along your away as a thank you. If you're interested, email me at [email protected] or join our public Slack and DM me.

    Source code(tar.gz)
    Source code(zip)
  • v0.9.0(May 20, 2021)

    v0.9.0

    Go1.16 support & bugfixes

    🌟 Help us spread the word about Prisma by starring the repo ☝️ or tweeting about the release.

    Major changes

    Go1.16 requires go.mod/go.sum to be up-to-date and that broke for generated code, as go mod tidy can't figure out what modules are needed before generating code. This is fixed by adding no-op imports in the Go client at a top-level, so they can be detected by Go modules correctly.

    Changes

    • fix(query): adapt default param struct name (#474) @steebchen
    • docs(readme): start documenting how to test (#469) @matthewmueller
    • docs(quickstart): remove --preview-feature flag (#472) @alfuhigi
    • docs(quickstart): adapt code example import path (#476) @steebchen
    • docs(quickstart): temporarily adapt quickstart (#481) @steebchen
    • fix(prisma): upgrade to 2.22.1 patch version (#480) @steebchen
    • feat(prisma): upgrade to 2.23.0 (#484) @steebchen
    • fix(header): add no-op imports for go modules (#485) @steebchen

    Contributors

    @alfuhigi, @matthewmueller and @steebchen

    Interested in providing feedback for the Go client?

    We would like to ask you a few questions and get your feedback about the Go client. We'll send merch along your away as a thank you. If you're interested, email me at [email protected] or join our public Slack and DM me.

    Source code(tar.gz)
    Source code(zip)
  • v0.8.0(May 5, 2021)

    v0.8.0

    Bugfixes & add AND operator. Upgrades to Prisma 2.22.0, making the db push command generally available.

    🌟 Help us spread the word about Prisma by starring the repo ☝️ or tweeting about the release.

    Major changes

    • feat(generator): add AND operator (#467) @steebchen

    Changes

    • feat(prisma): upgrade to 2.20.1 (#454) @steebchen
    • fix(query): add arguments to unlink (#456) @steebchen
    • chore(prisma): upgrade prisma & fix build constraints (#458) @steebchen
    • ci(release-drafter): adapt version in tweet link (#459) @steebchen
    • fix(transaction): adapt upsert & delete tx methods (#465) @steebchen
    • feat(prisma): upgrade prisma to 2.22.0 (#470) @steebchen

    Contributors

    @steebchen

    Interested in providing feedback for the Go client?

    We would like to ask you a few questions and get your feedback about the Go client. We'll send merch along your away as a thank you. If you're interested, email me at [email protected] or join our public Slack and DM me.

    Source code(tar.gz)
    Source code(zip)
  • v0.7.0(Apr 1, 2021)

    v0.7.0

    More native types & bugfixes

    🌟 Help us spread the word about Prisma by starring the repo ☝️ or tweeting about the release.

    Major changes

    The Go client now supports the native types Bytes, BigInt and Decimal:

    var views db.BigInt = 1
    bytes := []byte("abc")
    dec := decimal.NewFromFloat(1.23456789)
    created, err := client.User.CreateOne(
      db.User.Picture.Set(bytes),
      db.User.Balance.Set(dec),
      db.User.Views.Set(views),
    ).Exec(ctx)
    

    Changes

    • feat(client): introduce Bytes type (#443) @steebchen
    • feat(client): introduce BigInt type (#444) @steebchen
    • feat(client): introduce Decimal type (#445) @steebchen
    • test(types): add native type test (#446) @steebchen
    • chore: Create SECURITY.md (#447) @Jolg42
    • fix(query): use field type for cursor value (#450) @steebchen
    • fix(json): adapt internal json update handling (#451) @steebchen

    Contributors

    @Jolg42 and @steebchen

    Interested in providing feedback for the Go client?

    We would like to ask you a few questions and get your feedback about the Go client. We'll send merch along your away as a thank you. If you're interested, email me at [email protected] or join our public Slack and DM me.

    Source code(tar.gz)
    Source code(zip)
  • v0.6.0(Mar 22, 2021)

    v0.6.0

    Apart from lots of bugfixes, this release also introduces transaction return values:

    firstPost := client.Post.CreateOne(
        Post.Title.Set("First Post"),
    ).Tx()
    
    secondPost := client.Post.CreateOne(
        Post.Title.Set("Second Post"),
    ).Tx()
    
    if err := client.Prisma.Transaction(firstPost, secondPost).Exec(ctx); err != nil {
        panic(err)
    }
    
    log.Printf("first post result: %+v", firstPost.Result())
    log.Printf("second post result: %+v", secondPost.Result())
    

    🌟 Help us spread the word about Prisma by starring the repo ☝️ or tweeting about the release.

    Breaking changes

    When using transactions, you need to explicitly call .Tx() in each operation.

    before:

    firstPost := client.Post.CreateOne(
        Post.Title.Set("First Post"),
    )
    
    secondPost := client.Post.CreateOne(
        Post.Title.Set("Second Post"),
    )
    
    if err := client.Prisma.Transaction(firstPost, secondPost).Exec(ctx); err != nil {
        panic(err)
    }
    

    after:

    firstPost := client.Post.CreateOne(
        Post.Title.Set("First Post"),
    ).Tx()
    
    secondPost := client.Post.CreateOne(
        Post.Title.Set("Second Post"),
    ).Tx()
    
    if err := client.Prisma.Transaction(firstPost, secondPost).Exec(ctx); err != nil {
        panic(err)
    }
    

    Major changes

    • feat(transactions): add tx return values (#424) @steebchen

    Changes

    • fix(query): use AND queries to allow duplicate fields (#429) @steebchen
    • fix(query): adapt postgres array query type (#430) @steebchen
    • ci(release-drafter): adapt version in tweet link (#423) @steebchen
    • fix(engine): set http timeout to 0 (#431) @steebchen
    • fix(query): fix nil slices for pg array types (#432) @steebchen
    • docs(transaction): adapt transaction syntax (#435) @steebchen
    • fix(transaction): add Into(interface{}) method for QueryRaw (#438) @steebchen
    • docs(reference): improve transaction examples (#436) @matthewmueller
    • fix(transaction): introduce result method (#441) @steebchen

    Contributors

    @matthewmueller and @steebchen

    Extra thanks to @robojones for the help with transaction syntax!

    Interested in providing feedback for the Go client?

    We would like to ask you a few questions and get your feedback about the Go client. We'll send merch along your away as a thank you. If you're interested, email me at [email protected] or join our public Slack and DM me.

    Source code(tar.gz)
    Source code(zip)
  • v0.5.0(Mar 5, 2021)

    v0.5.0

    Tons of bugfixes & Upsert!

    🌟 Help us spread the word about Prisma by starring the repo ☝️ or tweeting about the release.

    Major changes

    UpsertOne

    post, err := client.Post.UpsertOne(
        // query
        Post.ID.Equals("upsert"),
    ).Create(
        // set these fields if document doesn't exist already
        Post.Title.Set("title"),
        Post.Views.Set(0),
        Post.ID.Set("upsert"),
    ).Update(
        // update these fields if document already exists
        Post.Title.Set("new-title"),
        Post.Views.Increment(1),
    ).Exec(ctx)
    if err != nil {
        panic(err)
    }
    

    Changes

    • fix(unique): use new uniqueFields model data (#391) @steebchen
    • ci(lint): increase timeout to 5m (#394) @steebchen
    • feat(raw): handle time values (#393) @steebchen
    • feat(transaction): support raw queries in transaction (#398) @steebchen
    • fix(fetch): allow fetching with update/delete (#400) @steebchen
    • docs: fix broken/missing links & example code (#403) @imkh
    • feat(generate): write debug file on env var (#404) @steebchen
    • feat(indexes): support composite id indexes, restructure templates (#405) @steebchen
    • fix(engine): remove debug logs (#412) @steebchen
    • fix(query): allow empty links to use with IfPresent (#413) @steebchen
    • fix: add dummy.go files to template dirs (#416) @bshihr
    • feat(upsert): add upsert (#415) @steebchen
    • docs(upsert): add docs for UpsertOne (#417) @steebchen
    • feat(prisma): upgrade to 2.17.0 (#421) @steebchen
    • feat(prisma): upgrade to 2.18.0 (#422) @steebchen

    Contributors

    @bshihr, @imkh and @steebchen

    Interested in providing feedback for the Go client?

    We would like to ask you a few questions and get your feedback about the Go client. We'll send merch along your away as a thank you. If you're interested, email me at [email protected] or join our public Slack and DM me.

    Source code(tar.gz)
    Source code(zip)
  • v0.4.1(Feb 9, 2021)

    v0.4.1

    A patch release for [email protected]. This fixes some connectivity issues with MySQL/SQL Server.

    🌟 Help us spread the word about Prisma by starring the repo ☝️ or tweeting about the release.

    Changes

    • feat(prisma): upgrade prisma to 2.16.1 patch release (#392) @steebchen

    Contributors

    @steebchen

    Interested in providing feedback for the Go client?

    We would like to ask you a few questions and get your feedback about the Go client. We'll send merch along your away as a thank you. If you're interested, email me at [email protected] or join our public Slack and DM me.

    Source code(tar.gz)
    Source code(zip)
  • v0.4.0(Feb 4, 2021)

    v0.4.0

    Dynamically build queries, helper methods, some BREAKING CHANGES (see below)

    🌟 Help us spread the word about Prisma by starring the repo ☝️ or tweeting about the release.

    Major changes

    Dynamically build queries

    Give your users more control over how they filter and order their data. Build up filters over time instead of all at once.

    Here's an example of setting specific attributes dynamically:

    func CreateUser(w http.ResponseWriter, r *http.Request) {
        var params []db.UserSetParam
        email := r.PostFormValue("email")
        kind := r.PostFormValue("kind")
        if kind == "customer" {
            // Set the referrer for users of type customer only
            params = append(params, db.User.Referer.Set(r.Header.Get("Referer"))
        }
        user, err := client.User.CreateOne(
            db.User.Kind.Set(kind),
            db.User.Email.Set(email),
            params...,
        ).Exec(r.Context())
        // ... Handle the response
    }
    

    Learn more in the dynamic queries document.

    ExecInner helper method

    Prisma uses a specific structure for its models. For some libraries, you might need a struct with pointer values instead of Prisma’s embedded structure. For this case, you can use the .InnerX embedded structs to get the plain object. However, there was no method for results with slices before, so we introduced ExecInner:

    users, err := client.User.FindMany().ExecInner(ctx)
    doSomething(users)
    

    Breaking changes

    All methods returning structs now return a pointer to a struct

    Methods in shape of (T, error) now return (*T, error):

    user, err := client.User.FindMany().Exec(ctx) 
    // user was of type db.UserModel
    // user is now of type *db.UserModel
    log.Printf(“user: %+v”, *user)
    

    Methods returning a primitive value such as count now returns struct

    For more consistency, all methods which used to return a count-like value now return a pointer to a struct.

    result, err := client.User.FindMany().Update(…).Exec(ctx) 
    // result was of type int before
    // result is now a pointer to a struct
    log.Printf(“user: %d”, result.Count)
    

    This affects the following methods:

    client.X.FindMany().Update().Exec(ctx)
    client.X.FindMany().Delete().Exec(ctx)
    client.ExecuteRaw(…).Exec(ctx)
    

    Embedded model structs InternalX are renamed to InnerX

    Internal might be misleading as it’s recommended to use the top-level return value wherever possible, but with some libraries you might need to use the embedded struct, so we renamed it to Inner to make it more clear what it does.

    user, err := client.User.FindUnique()
    // was called user.InternalUser before
    // now is called user.InnerUser
    doSomething(user.InnerUser)
    

    Changes

    • ci(test): remove verbose logs (#375) @steebchen
    • fix(templates): rename internal->inner (#376) @steebchen
    • feat(query): add ExecInner for find queries (#373) @steebchen
    • fix(create): accept interface in CreateOne (#378) @steebchen
    • fix(tests): throttle test setup schema generation (#379) @steebchen
    • feat(client): export builder interfaces (#380) @steebchen
    • feat(client): introduce result struct, use pointers (#381) @steebchen
    • docs(reference): add dynamic queries docs (#383) @steebchen
    • feat(prisma): upgrade to 2.16.0; adapt dmmf, publish & tests (#384) @steebchen
    • ci(release-drafter): use minor version in template (#385) @steebchen
    • fix(types): define count result in types (#386) @steebchen
    • fix(types): rename count result to BatchResult (#387) @steebchen
    • fix(raw): change int return value to BatchResult (#388) @steebchen

    Contributors

    @steebchen

    Interested in providing feedback for the Go client?

    We would like to ask you a few questions and get your feedback about the Go client. We'll send merch along your away as a thank you. If you're interested, email me at [email protected] or join our public Slack and DM me.

    Source code(tar.gz)
    Source code(zip)
  • v0.3.0(Jan 21, 2021)

    v0.3.0

    • Introduces basic transactions
    • Introduces FindFirst
    • FindOne is deprecated in favour of FindUnique
    • There's also a new Prisma namespace for Prisma-related functions.

    🌟 Help us spread the word about Prisma by starring the repo ☝️ or tweeting about the release.

    Major changes

    Introducing transactions: run multiple statements at once, guaranteeing that everything as a whole either fails or succeeds.

    createUserA := client.User.CreateOne(
    	User.Email.Set("a"),
    	User.ID.Set("a"),
    )
    
    createUserB := client.User.CreateOne(
    	User.Email.Set("b"),
    	User.ID.Set("b"),
    )
    
    if err := client.Prisma.Transaction(createUserA, createUserB).Exec(ctx); err != nil {
    	panic(err)
    }
    

    FindOne is deprecated. It's renamed to FindUnique.

    To find a record which is not guaranteed to be unique, you can now use the new FindFirst method to use the first element which is found:

    post, err := client.Post.FindFirst(
        db.Post.Title.Equals("hi"),
    ).Exec(ctx)
    if errors.Is(err, db.ErrNotFound) {
        log.Printf("no record with title 'hi' found")
    } else if err != nil {
        log.Printf("error occurred: %s", err)
    }
    
    log.Printf("post: %+v", post)
    

    All Prisma-related functions on the prisma client object are deprecated in favour of a new prisma namespace.

    The following methods:

    client := prisma.NewClient()
    
    client.Connect(…)
    client.Disconnect(…)
    client.ExecuteRaw(…)
    client.QueryRaw(…) 
    

    Should be used as follows:

    client := prisma.NewClient()
    
    client.Prisma.Connect(…)
    client.Prisma.Disconnect(…)
    client.Prisma.ExecuteRaw(…)
    client.Prisma.QueryRaw(…)
    

    Changes

    • fix(binaries): add hash to engine path (#338) @steebchen
    • feat(prisma): upgrade to 2.12.0 (#339) @steebchen
    • ci(publish): specify node targets explicitly; cleanup (#341) @steebchen
    • feat(query): add FindFirst method (#352) @steebchen
    • chore(prisma): upgrade prisma to 2.14.0 (#354) @steebchen
    • fix(query): deprecate FindOne, replace with FindUnique (#353) @steebchen
    • fix(query): adapt non-find queries for new find calls (#355) @steebchen
    • fix(query): disallow additional methods on FindFirst (#356) @steebchen
    • docs(reference): add FindFirst paragraph; adapt FindUnique (#358) @steebchen
    • refactor(generator): return -1 on raw error; minor code cleanup (#359) @steebchen
    • feat(client): introduce prisma client namespace (#360) @steebchen
    • refactor(project): extract packages into runtime folder (#361) @steebchen
    • feat(client): add transactions (#336) @steebchen
    • docs(transaction): add transaction docs (#362) @steebchen
    • docs(quickstart): use prisma folder for schema path (#335) @steebchen
    • docs(reference): cleanup schemas & examples (#366) @steebchen
    • chore(binaries): upgrade prisma to 2.15.0 (#368) @steebchen
    • fix(find): make sure FindOne deprecation comment works (#367) @steebchen
    • docs(reference): adapt FindFirst example (#369) @steebchen
    • docs(reference): adapt error checking in find examples (#370) @steebchen

    Contributors

    @steebchen

    Interested in providing feedback for the Go client?

    We would like to ask you a few questions and get your feedback about the Go client. We'll send merch along your away as a thank you. If you're interested, email me at [email protected] or join our public Slack and DM me.

    Source code(tar.gz)
    Source code(zip)
  • v0.2.0(Dec 7, 2020)

    v0.2.0

    JSON support, native mocks, helper methods & minor improvements

    🌟 Help us spread the word about Prisma by starring the repo ☝️ or tweeting about the release.

    Major changes

    • feat(prisma): upgrade prisma to 2.11.0 (#301) @steebchen
    • feat(types): add basic json support (#310) @steebchen
    • feat(query): introduce IfPresent method variants (#300) @steebchen
    • feat(mocks): add native mocking (#315) @steebchen

    Changes

    • chore(dockerignore): use globs correctly (#293) @steebchen
    • refactor(project): move err checks to if clauses (#305) @steebchen
    • chore(project): format prisma schema files (#306) @steebchen
    • fix(builder): remove manual date time serialisation (#311) @steebchen
    • test(setup): bump mysql version, use fixed pg image (#312) @steebchen
    • ci(workflows): remove rebase command (#313) @steebchen
    • refactor(generator): use universal graphql result (#314) @steebchen
    • fix(test): disable migrate logs per default (#316) @steebchen
    • chore(test): use db push instead of migrate (#307) @steebchen
    • docs(json): add json docs (#320) @steebchen
    • ci(github): ignore docs changes in GitHub actions (#321) @steebchen
    • chore(jetbrains): add shared .idea config (#325) @steebchen
    • chore(jetbrains): remove watcher tasks file (#327) @steebchen
    • ci(github): revert ignoring docs folder (#323) @steebchen
    • chore(idea): set git toolbox commit message validation (#329) @steebchen
    • docs(reference): document optional type filters (#328) @steebchen
    • docs(reference): document XIfPresent method variants (#330) @steebchen
    • test(mocks): rename prisma client variable (#331) @steebchen
    • docs(reference): document mock usage and example (#332) @steebchen
    • refactor(engine): simplify internal engine (#333) @steebchen
    • refactor(builder): extract exec method (#334) @steebchen

    Contributors

    @steebchen

    Interested in providing feedback for the Go client?

    We would like to ask you a few questions and get your feedback about the Go client. We'll send merch along your away as a thank you. If you're interested, email me at [email protected] or join our public Slack and DM me.

    Source code(tar.gz)
    Source code(zip)
  • v0.1.0(Nov 9, 2020)

    v0.1.0

    Go client early access

    The Go client is now an early access product and is not considered experimental anymore. 🎉 This means we will continue to invest in the Go client, but at the same time those resourced will be limited and we may have breaking changes in minor releases.

    Release Notes

    This release contains minor improvements and bumps the internal Prisma CLI to 2.10.2.

    🌟 Help us spread the word about Prisma by starring the repo ☝️ or tweeting about the release.

    Major changes

    • bump internal Prisma CLI to 2.10.2 (#290, #291)
    • improve docs (#284)
    • fix .Link() method parameters (#288)

    Changes

    • fix(errors): refactor internal pql error handling (#279) @steebchen
    • fix(raw): adapt result struct (#281) @steebchen
    • test(raw): test insert into raw statements (#280) @steebchen
    • test(raw): add tests for update (#283) @steebchen
    • docs(raw): clarify raw methods (#282) @steebchen
    • feat(docs): refactor docs; add pagination & order by (#284) @steebchen
    • fix(query): link many relations in nested create/update (#288) @steebchen
    • feat(prisma): upgrade to 2.10.1 (#290) @steebchen
    • feat(prisma): bump to 2.10.2 (#291) @steebchen
    • ci(workflows): add rebase command (#292) @steebchen
    • chore(project): minor code improvements & linter fixes (#295) @steebchen
    • ci(release-drafter): switch to minor versions (#296) @steebchen
    • docs(readme): change alpha mention to EAP (#297) @steebchen

    Contributors

    @steebchen

    Interested in providing feedback for the Go client?

    We would like to ask you a few questions and get your feedback about the Go client. We'll send merch along your away as a thank you. If you're interested, email me at [email protected], join our public Slack, or schedule a call directly with us.

    Source code(tar.gz)
    Source code(zip)
  • v0.0.10(Oct 15, 2020)

    v0.0.10

    Tons of bugfixes, minor improvements, docs updates... and number type operations!

    post, err := client.Post.FindOne(
    	Post.ID.Equals("a"),
    ).Update(
    	Post.IntField1.Increment(3),
    	Post.FloatField2.Decrement(2.5),
    	Post.IntField3.Multiply(2),
    	Post.FloatField4.Divide(1.5),
    ).Exec(ctx)
    

    🌟 Help us spread the word about Prisma by starring the repo ☝️ or tweeting about the release.

    Major changes

    • feat(builder): add number type operations (#271) @steebchen

    Changes

    • docs(reference): use new models in code examples (#253) @steebchen
    • docs(quickstart): simplify quickstart; add formatted example (#252) @steebchen
    • fix(find): check for error in exec (#255) @steebchen
    • docs(raw): adapt ExecuteRaw example (#258) @steebchen
    • fix(find): improve error handling (#259) @steebchen
    • test(setup): use non-standard ports to prevent clashes (#260) @steebchen
    • docs(reference): major docs refactor (#261) @steebchen
    • docs(quickstart): fix spacing (#263) @steebchen
    • fix: formatting within markdown snippets (#265) @jaymecd
    • docs(reference): change "updated" to "deleted" (#266) @FranciscoMendes10866
    • test(setup): remove unused db from test schema (#274) @steebchen

    Contributors

    @FranciscoMendes10866, @janpio, @jaymecd and @steebchen

    Interested in providing feedback for the Go client?

    We would like to ask you a few questions and get your feedback about the Go client. We'll send merch along your away as a thank you. If you're interested, email me at [email protected] or join our public Slack and DM me.

    Source code(tar.gz)
    Source code(zip)
  • v0.0.9(Sep 22, 2020)

  • v0.0.8(Sep 22, 2020)

    v0.0.8

    A small release containing bugfixes and documentation updates.

    Changes

    • fix(query): match compound keys to model (#239) @steebchen
    • refactor(code): minor code improvements (#241) @steebchen
    • ci(lint): use golangcilint cli (#240) @steebchen
    • ci(lint): adapt trigger to push & pr (#242) @steebchen
    • docs(readme): improve go database libraries list (#238) @satishbabariya
    • docs(reference/raw): update raw methods to new spec (#243) @steebchen
    • fix(fetch): use field type for OrderBy params (#245) @steebchen
    • docs(all): refactor docs (#244) @steebchen

    Contributors

    @satishbabariya and @steebchen

    Source code(tar.gz)
    Source code(zip)
  • v0.0.7(Sep 4, 2020)

    v0.0.7

    A small patch release to adapt the naming of generated query engine go files, plus clean up some old documentation.

    Major changes

    The generated go query engine files are now named query-engine-{platform}_gen.go, and the automatically generated gitignore is adapted as well.

    Changes

    • fix(binaries): use all_commits binaries url (#223) @steebchen
    • docs(quickstart): remove generator options (#225) @steebchen
    • ci(lint): use golangci-lint github action (#226) @steebchen
    • ci(test): cache test workflow deps (#231) @steebchen
    • fix(generator): use _gen suffix for query engine files (#234) @steebchen
    • docs(quickstart): remove outdated configuration hints (#236) @steebchen

    Contributors

    @steebchen

    Source code(tar.gz)
    Source code(zip)
  • v0.0.6(Aug 24, 2020)

    v0.0.6

    Upgrades Prisma to its stable version 2.0.0 and introduces a new pagination API as well as differences in the raw API. We also renamed internal structs from "RawX" to "InternalX" to prevent confusion with the SQL raw API.

    Major changes

    • chore(prisma): upgrade to prisma 2.0.0-beta.7 (#217) @steebchen
    • fix(tpl/models): rename model prefix Raw to Internal (#218) @steebchen
    • chore(prisma): upgrade to prisma 2.0.0-beta.9 (#220) @steebchen
    • chore(prisma): upgrade to prisma 2.0.0 (#222) @steebchen

    Contributors

    @steebchen

    Source code(tar.gz)
    Source code(zip)
  • v0.0.5(Aug 21, 2020)

    v0.0.5

    Binary files refactor. The prisma go client uses the prisma query engine internally.

    Instead of fetching the query engine on runtime, it is now fetched on generate time into the user's project dir. The correct binary is picked up by go build using build constraints. There will also be a .gitignore generated into the output dir so that the generated prisma client and the query engine files are ignored by default.

    The output field in the schema.prisma file now accepts a folder instead of a file.

    Major changes

    • feat(binaries): load binaries into project dir (#214) @steebchen

    Contributors

    @steebchen

    Source code(tar.gz)
    Source code(zip)
  • v0.0.4(Jul 8, 2020)

    v0.0.4

    Bug fixes and docs improvements.

    Changes

    • ci(release-drafter): adapt template (#178) @steebchen
    • docs(reference/basic): rename photon to db (#182) @matthewmueller
    • fix(query/composite): make composite keys work (#185) @steebchen
    • fix(generator): support non-uppercase table names (#186) @steebchen
    • fix: Update quickstart (#187) @brenelz
    • docs(readme): add contributing section (#189) @steebchen

    Contributors

    @brenelz, @matthewmueller and @steebchen

    Source code(tar.gz)
    Source code(zip)
  • v0.0.3(Jun 19, 2020)

    v0.0.3

    This release adds alpine support, improves code constraints, adds features, and provides various bugfixes.

    Major changes

    • Alpine Linux support (#154)
    • Improve code constraints (#157, #158)
    • Change default package name to db (#160) (use the package option in schema.prisma to override)
    • Add postgres scalar list support (#163)
    • Tons of bugfixes

    Changes

    • test(dbs/raw): add more types to raw tests (#156) @steebchen
    • feat(query): add composite FindOne params (#157) @steebchen
    • fix(query/findOne): improve FindOne constraints (#158) @steebchen
    • fix(tpl): change model and field conflict (#162) @steebchen
    • feat(tpl/create): allow fetching for relations in CreateOne (#165) @steebchen
    • chore: add security email to README (#170) @Jolg42
    • fix(query): add .Unlink() method (#173) @steebchen
    • fix(cli): hide update message (#175) @steebchen
    • fix(tpl/enums): use original enum values (#176) @steebchen
    • fix(query): simplify SetOptional (#177) @steebchen

    Contributors

    @Jolg42 and @steebchen

    Source code(tar.gz)
    Source code(zip)
  • v0.0.2(Jun 3, 2020)

    v0.0.2

    This release provides bugfixes and introduces new features.

    Major changes

    • Bugfixes
    • Fetch multiple things using the .With() syntax (#110) @steebchen
    • Add raw sql api (#120) @steebchen
    • Upgrade Prisma from beta.2 to alpha.1265 to include beta.6 with some bugfixes (see Prisma release notes)

    Changes

    • feat(cli): allow overriding engines with env vars (#87) @steebchen
    • test(types): add second enum to ensure it works (#96) @steebchen
    • test(types): prefix CreateOne params with an underscore (#97) @steebchen
    • chore(dockerignore): ignore build/ and other files (#98) @steebchen
    • fix(tpl/client): rename Client to PrismaClient (#99) @steebchen
    • fix(windows): make go client work on windows (#100) @steebchen
    • fix(binaries): rename warn->info, print info binary download (#101) @steebchen
    • feat(client/create): add SetOptional methods (#108) @steebchen
    • refactor(tests): improve test hooks (#111) @steebchen
    • feat(client): implement With() syntax (#110) @steebchen
    • fix(load): remove old load API (#114) @steebchen
    • fix(tpl/models): adapt spacing in model structs (#116) @steebchen
    • test(relations): add json marshal test with relations (#117) @steebchen
    • fix(generator): allow generic field formatting (#119) @steebchen
    • feat(tpl/models): expose internal struct (#118) @steebchen
    • feat(client): add raw sql api (#120) @steebchen
    • refactor(test): add db specific tests; improve structure (#122) @steebchen
    • refactor(docs): restructure docs & minor improvements (#123) @steebchen
    • docs(readme): add cli notes & add docs root readme (#124) @steebchen
    • test(databases): add raw count test (#125) @steebchen
    • fix(tpl/models): adapt relation return signature (#131) @steebchen
    • fix(query): adapt casing for some field cases (#132) @steebchen
    • fix(query): use relation name on To-structs (#134) @steebchen
    • docs(reference): split up reference docs (#135) @steebchen
    • docs(reference): fix reference link (#136) @steebchen
    • feat(runtime): add timing logs in debug mode (#141) @steebchen
    • refactor(tests): refactor test suite, improve db specific tests (#144) @steebchen
    • feat(upgrade): upgrade to prisma 2.0.0-alpha.1253 (#145) @steebchen
    • perf(tests): run client generation in parallel (#146) @steebchen
    • fix(main): warn when running the bare module (#147) @steebchen
    • revert(main): warn when running the bare module (#148) @steebchen
    • fix(main): warn when running the bare module; upgrade prisma (#149) @steebchen

    Contributors

    @Nohac and @steebchen

    Source code(tar.gz)
    Source code(zip)
  • v0.0.1(Apr 8, 2020)

    First release: v0.0.1

    This is the first release of the Go client. Please note that it's experimental and not production ready; we just introduce releases to make it easier to document changes and improve the experience with Go modules.

    This release uses the Prisma CLI @prisma/[email protected].

    Breaking changes

    This affects people who have used Prisma Go client before this release, i.e. directly from the master branch.

    General changes

    The internal Prisma CLI was upgraded from alpha.403 to beta.2. Please follow the upgrade instructions for preview023, preview024, and preview025, beta.1 and beta.2 on the Prisma CLI releases page. This was a major upgrade and will happen much more incremental in the future instead of big updates like this.

    Schema

    The provider has changed to go run github.com/prisma/prisma-client-go:

       generator db {
    -    provider = "prisma-client-go"
    +    provider = "go run github.com/prisma/prisma-client-go"
         output = "./db/db_gen.go"
         package = "db"
       }
    

    Cursors

    When querying for cursors, the fields now have to specified explicitly.

      posts, err := client.
      	Post.
      	FindMany().
      	OrderBy(
      		Post.Title.Order(ASC),
      	).
      	Last(2).
    - 	Before("c").
    + 	Before(Post.Title.Cursor("c")).
      	Exec(ctx)
    

    Load syntax

    The .Load() Syntax temporarily doesn't support multiple queries on the root level. This is only a temporary limitation which will be removed in the future. You can still query for nested relations.

    Other changes

    We now use zeit/pkg to build a binary of the Prisma CLI.

    Source code(tar.gz)
    Source code(zip)
Owner
Prisma
Prisma makes working with databases easy
Prisma
gqlgenc is a fully featured go gql client, powered by codegen

gqlgenc Note: ⚠️ This is a WIP, backward-compatibility cannot be guaranteed yet, use at your own risk gqlgenc is a fully featured go gql client, power

Infiot Inc 28 Apr 23, 2022
GoSNMP is an SNMP client library fully written in Go

GoSNMP is an SNMP client library fully written in Go. It provides Get, GetNext, GetBulk, Walk, BulkWalk, Set and Traps. It supports IPv4 and IPv6, using SNMPv1, SNMPv2c or SNMPv3. Builds are tested against linux/amd64 and linux/386.

Go SNMP 872 Aug 4, 2022
Fast Telegram client fully in go.

Telegram client, in Go. (MTProto API)

gotd 516 Aug 7, 2022
GoSNMP is an SNMP client library fully written in Go.

GoSNMP is an SNMP client library fully written in Go. It provides Get, GetNext, GetBulk, Walk, BulkWalk, Set and Traps. It supports IPv4 and IPv6, using SNMPv1, SNMPv2c or SNMPv3. Builds are tested against linux/amd64 and linux/386.

uctest 1 Oct 28, 2021
Create a gRPC server from code generated by sqlc

sqlc-grpc Create a gRPC Server from the generated code by the awesome sqlc project. Dependencies Go 1.16 or superior protoc sqlc, protoc-gen-go and pr

Walter Wanderley 61 Jun 27, 2022
null 38 Aug 3, 2022
A simple Go library to toggle on and off pac(proxy auto configuration) for Windows, MacOS and Linux

pac pac is a simple Go library to toggle on and off pac(proxy auto configuration

null 0 Dec 26, 2021
Laptop Booking Application in Golang and gRPC, load-balancing with NGINX, and fully compatible with HTTPS OpenAPI v3

Laptop Booking Application in Golang and gRPC Goals GitHub CI & Coverage Badge Serialize protobuf messages Create laptop unary gRPC Search laptop Serv

Tien La 3 Jun 17, 2022
Gmqtt is a flexible, high-performance MQTT broker library that fully implements the MQTT protocol V3.1.1 and V5 in golang

中文文档 Gmqtt News: MQTT V5 is now supported. But due to those new features in v5, there area lots of breaking changes. If you have any migration problem

null 709 Aug 5, 2022
This project provides fully automated one-click experience to create Cloud and Kubernetes environment to run Data Analytics workload like Apache Spark.

Introduction This project provides a fully automated one-click tool to create Data Analytics platform in Cloud and Kubernetes environment: Single scri

DataPunch - One Click to Create Cloud and Kubernetes Environment for Data Analytics and Apache Spark 41 Jul 22, 2022
socks5 proxy server with auto upstream selection

atproxy socks5 proxy server with auto upstream selection installation go install github.com/reusee/atproxy/[email protected] select process for each cli

null 10 Dec 22, 2021
Diag - Auto Diagdnosis error log for golang

Diag 1:自动诊断产品日志中的报错信息,进行知识库比对,并给出解决方案 \n 2:prometheus 本地数据 api 拉取展示,应对 sm0.2 版本或

null 0 Jan 28, 2022
OpenTelemetry auto-instrumentation for Go applications

OpenTelemetry Auto-Instrumentation for Go This project adds OpenTelemetry instrumentation to Go applications without having to modify their source cod

keyval 153 Aug 5, 2022
Automatically spawn a reverse shell fully interactive for Linux or Windows victim

Girsh (Golang Interactive Reverse SHell) Who didn't get bored of manually typing the few lines to upgrade a reverse shell to a full interactive revers

null 273 Aug 4, 2022
纯Go编写的IM,完全自定义协议的高性能即时通讯服务(High-performance instant messaging service with fully customizable protocol)

LiMaoIM (Everything so easy) This project is a simple and easy to use, powerful performance, simple design concept instant messaging service, fully cu

null 133 Jul 12, 2022
DeSo is a blockchain built from the ground up to support a fully-featured social network

DeSo is a blockchain built from the ground up to support a fully-featured social network. Its architecture is similar to Bitcoin, only it supports complex social network data like profiles, posts, follows, creator coin transactions, and more.

DeSo Protocol 284 Jul 27, 2022
Xray, Penetrates Everything. Also the best v2ray-core, with XTLS support. Fully compatible configuration.

Project X Project X originates from XTLS protocol, provides a set of network tools such as Xray-core and Xray-flutter. License Mozilla Public License

Project X Community 9.3k Aug 6, 2022
Episode VII: The DB Awakens (fully stablished JSON communication system)

APITrials0.7 Episode VII: The DB Awakens (fully stablished JSON communication system) Captain's log: Im too deep into the rabbit hole now. This seems

Rafael Diaz Miles 0 Jan 10, 2022
Subfinder is a subdomain discovery tool that discovers valid subdomains for websites. Designed as a passive framework to be useful for bug bounties and safe for penetration testing.

Fast passive subdomain enumeration tool. Features • Install • Usage • API Setup • License • Join Discord Subfinder is a subdomain discovery tool that

ProjectDiscovery 5.9k Aug 4, 2022