Git Product home page Git Product logo

Comments (9)

cloudtrends avatar cloudtrends commented on August 28, 2024

Yes! +1

To add text is very necessary!

from gorp.

lukescott avatar lukescott commented on August 28, 2024

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.

jamesaanderson avatar jamesaanderson commented on August 28, 2024

👍

from gorp.

rvenugopal avatar rvenugopal commented on August 28, 2024

+1

from gorp.

marwan-nwh avatar marwan-nwh commented on August 28, 2024

+1

from gorp.

anentropic avatar anentropic commented on August 28, 2024

seems an elementary feature... issue opened a year ago... no comment from project owner... doesn't look good?

from gorp.

mauleyzaola avatar mauleyzaola commented on August 28, 2024

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.

coopernurse avatar coopernurse commented on August 28, 2024

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.

sinni800 avatar sinni800 commented on August 28, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.