Comments (1)
Hey @english943 👋
All
, Only
First
, and similar functions return objects (entities). After an object is returned, you can query its associations/edges, update it, delete it, etc. An ID is necessary for these operations, which is why ent adds it by default.
However, you can still execute such queries in ent as explained in this document: https://entgo.io/docs/crud#field-selection.
var v []struct {
A int `sql:"a"`
B int `sql:"b"`
}
client.T.Query().Unique(true).Select(t.FieldA, t.FieldB).Scan(ctx, &v)
from ent.
Related Issues (20)
- panic: go generate ./ent HOT 2
- Flaky tests due to relying on default result ordering
- graphql with customized JSON struct HOT 1
- how to write tests with enttest for a geometry field ? HOT 3
- [Edge][UUID] named field to named field relations? "([16]byte != int)" HOT 4
- [migrate] default value diff query=SELECT '0.0' = 0 HOT 1
- Codegen is creating duplicate functions HOT 4
- Create a record without needing to write every field line by line HOT 2
- [Question] Will Cloud Spanner be supported in the future? HOT 1
- question: Spatial Data Types for PostGIS HOT 2
- does entio support postgreesql RUM feature? HOT 1
- Expected value of the generated WithFixedNodeType?
- How to generate a schema file from an existing MySQL database HOT 1
- schema.WriteDriver neglects dialect
- How to use "sql.In" with uuids? HOT 1
- Opt-in mode for entgql.WithSchemaGenerator
- Use ent to import sql dump for postgres
- Partial indexes are always re-created when generating a migration file HOT 2
- table COMMENT Annotations will be automatically migrated and overwritten HOT 1
- entc/gen: set "TUser" foreign-keys: edge "t_wallets_user_id" has a field "user_id" but it is not holding a foreign key
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ent.