Comments (9)
Yes! +1
To add text is very necessary!
from gorp.
There needs to be more control over types. I made a suggestion in this issue here https://github.com/coopernurse/gorp/issues/58.
My biggest issue is some of my types need to be BINARY. For now I think I'm going to create tables manually.
from gorp.
👍
from gorp.
+1
from gorp.
+1
from gorp.
seems an elementary feature... issue opened a year ago... no comment from project owner... doesn't look good?
from gorp.
I fully agree with the comments above. For me, working only with Postgresql databases it is impossible to take GORM seriously without this feature.
from gorp.
The ToSqlType()
command in the default dialects is primarily provided as an example. You can easily write your own dialect that implements ToSqlType()
with any rules you like.
If you'd like to extend the default dialect, one option is to add an optional field to PostgresDialect that specifies the cutoff for maxsize that would dictate whether to use a text field. But this is a slippery slope that may further reinforce the idea that the provided dialect implementations are intended to satisfy all use cases.
from gorp.
I think a really easy change would be to add a new attribute to ColumnMap to override the SQL type. Since TEXT, for example, can be used just like varchar anyway, that could work out in this case.
I mean we can override the column size, so why not the column type, too?
from gorp.
Related Issues (20)
- SqlServerDialect invalid create schema statement
- If there is a default value for the tag, it will always be inserted.
- v3 module naming causes error when requested HOT 3
- Is there a postgres read replicas support?
- Get without assertion HOT 2
- update fails to find table
- select on conflict HOT 2
- Object Mapper design/functionality?
- How about making a v3 branch the default branch? (suggestions for future mainenance) HOT 2
- Some naming violates "Go Code Review Comments (Initialisms)" HOT 2
- maybeExpandNamedQuery & driver.Valuer conflict HOT 1
- Support sql.IsolationLevel for transactions
- security: Add support for another column along with autoincrment column in where clause in update statement
- DbMap.Select fails when passed only one parameter *time.Time.
- Oracle: Create the table is not working
- context cannot be passed to DbMap.Begin
- per-transaction timeout interval setting in DbMap
- Snowflake support
- Issue with Parameter Info when execute QueryContext with parameter encode.
- CreateTablesIfNotExists() generates an error when using sql server driver
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 gorp.