Comments (4)
Can you please describe your use case for this? We actually had this feature at one point but decided to replace it with the blacklist functionality, because our assumption is that it should be a rare scenario for someone to only want to generate support for a few of their database tables (because the whole ORM and database generally acts as a cohesive unit; especially in regard to relationships), but a common scenario to exclude a few tables (like migration tables). Of course, if this assumption is wrong, we're open to the idea.
from sqlboiler.
Sure.
it's problematic to blacklist if you have partitioned tables with table inheritance. So for example you have partitioned tables by month and you have master table which should actually be used for any interaction with that model. With current implementation each of those partitioned tables would have to be excluded individually which is cumbersome especially in development phase where these tables are generated automatically and different environments have different tables.
Also it's useful if you want to logically divide models into two or more packages to separate concerns. With whitelisting you could generate models for a subset of tables (e.g. blog, ecommerce, etc.).
If you don't think these are valid arguments for you to invest time I can probably create a pull request if your policy is to accept them.
from sqlboiler.
Fair enough. I have no problem with it, if @aarondl has no objections we can add this back in some time this week. Thanks.
from sqlboiler.
@ajankovic the feature is in the dev branch now, if you'd like to test it. We're going to work on the other features in the issues list before releasing them together.
from sqlboiler.
Related Issues (20)
- Upsert not returning all model attributes on conflict HOT 3
- [Feature Request] Ignore Composite Foreign Key Constraint HOT 2
- Enum collision problem HOT 1
- Exposing more table constants/metadata to facilitate metaprogramming HOT 1
- Enum order auto-gen
- Eager loading user table results in an sql error if the user table has a delete_at field
- Bug: various int arrays are generated as `types.Int64Array` which leads to out of range errors in tests
- Bug: .Bind() is not working properly when selecting specific columns HOT 3
- types aliasing only replaces one type
- Request to revert PR #1290 (BUG) HOT 3
- Bug in `queries.MakeStructMapping` when boil tag is `boil:",bind"` HOT 1
- [feature request] MySQL Optimizer Hints HOT 4
- FeatureRequest: struct tag case only for json HOT 3
- Bug in queries/reflect.go in which bind does not check rows.Err() prior to returning sql.ErrNoRows HOT 1
- Bug when binding to *struct in struct HOT 1
- AndIn generates a list of pairs instead of a flat list. HOT 1
- Non deterministic column binding when same column name across two tables (inner join) HOT 1
- Configuring aliases for relationships for sqlite is not working HOT 6
- types.Hstore does not works HOT 1
- Foreign key causes "panic: interface conversion: string is not error: missing method Error" HOT 1
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 sqlboiler.