prisma-client-go

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

APACHE-2.0 License

Stars
1.9K
Committers
25

Bot releases are visible (Hide)

prisma-client-go - v0.11.0

Published by github-actions[bot] about 3 years ago

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.

prisma-client-go - v0.10.0

Published by github-actions[bot] over 3 years ago

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.

prisma-client-go - v0.9.0

Published by github-actions[bot] over 3 years ago

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.

prisma-client-go - v0.8.0

Published by github-actions[bot] over 3 years ago

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.

prisma-client-go - v0.7.0

Published by github-actions[bot] over 3 years ago

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.

prisma-client-go - v0.6.0

Published by github-actions[bot] over 3 years ago

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.

prisma-client-go - v0.5.0

Published by github-actions[bot] over 3 years ago

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.

prisma-client-go - v0.4.1

Published by github-actions[bot] over 3 years ago

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.

prisma-client-go - v0.4.0

Published by github-actions[bot] over 3 years ago

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.

prisma-client-go - v0.3.0

Published by github-actions[bot] over 3 years ago

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.

prisma-client-go - v0.2.0

Published by github-actions[bot] almost 4 years ago

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.

prisma-client-go - v0.1.0

Published by github-actions[bot] almost 4 years ago

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.

prisma-client-go - v0.0.10

Published by github-actions[bot] about 4 years ago

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.

prisma-client-go - v0.0.9

Published by github-actions[bot] about 4 years ago

v0.0.9

This upgrades the Prisma CLI to 2.7.1.

It's known that this release currently doesn't work on windows. If you need windows support, please stay on v0.0.8 and follow the windows support tracking issue.

Major changes

  • chore(prisma): upgrade prisma to 2.7.1 (#230) @steebchen

Contributors

@steebchen

prisma-client-go - v0.0.8

Published by github-actions[bot] about 4 years ago

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

prisma-client-go - v0.0.7

Published by github-actions[bot] about 4 years ago

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

prisma-client-go - v0.0.6

Published by github-actions[bot] about 4 years ago

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

prisma-client-go - v0.0.5

Published by github-actions[bot] about 4 years ago

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

prisma-client-go - v0.0.4

Published by github-actions[bot] over 4 years ago

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

prisma-client-go - v0.0.3

Published by github-actions[bot] over 4 years ago

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