Absolutely, plus ORM usually offers a convenient way to run raw SQL 
queries, if you need it.



On Saturday, September 28, 2019 at 7:50:22 AM UTC+3, alex.b...@gmail.com 
wrote:
>
> First, nobody thinks that knowing ORM's query language absolves one from 
> knowing SQL.
>
> But the main issue is that Go SQL interface SUCKS. It's verbose, hard to 
> use and is difficult to integrate with additional tooling (try adding 
> generic tracing support, I dare you!). So often your SQL code is hidden in 
> reams of wrapper code that sets arguments and reads the results.
>
> So even simple ORMs that allow mapping of result sets to objects help to 
> reduce boilerplate clutter. More advanced ORMs also offer simple type safe 
> queries: https://github.com/go-reform/reform
>
> It's still nowhere close to LINQ for C# or http://www.querydsl.com/ for 
> Java, but it's getting there.
>
> On Friday, September 27, 2019 at 3:34:59 AM UTC-7, Dimas Prawira wrote:
>>
>> Many Gophers don't like ORM as :
>> 1. ORM introduce an additional layer of abstraction that doesn't 
>> accomplish anything.
>> 2. SQL syntax is more or less the same for every database.
>> 3. If you learn an ORM in Java, you will only ever able to use that ORM 
>> knowledge in Java. If you learn SQL, you can use that SQL with almost 
>> _exactly the same_ with any other database, and in any programming language.
>> 4. ORMs don't save you any time. The number of "lines" of code for an 
>> ORM will be more or less the same as the equivalent logic done in SQL.
>>
>> But if still need to use ORM for any reasons, then you can try GORM 
>> https://gorm.io/
>>
>> cheers
>>
>> On Fri, Sep 27, 2019 at 4:20 AM b ram <bram.go...@gmail.com> wrote:
>>
>>> Hi,
>>>
>>> Can you pls suggest libs for  ORM & Schema Migration.
>>>
>>> Thanks.
>>>
>>> -- 
>>> You received this message because you are subscribed to the Google 
>>> Groups "golang-nuts" group.
>>> To unsubscribe from this group and stop receiving emails from it, send 
>>> an email to golan...@googlegroups.com.
>>> To view this discussion on the web visit 
>>> https://groups.google.com/d/msgid/golang-nuts/CAB9V516cRxPc8xuQcXQyBGXZWenv0o9ned%2BFDq2WmXyhBNm2Sg%40mail.gmail.com
>>>  
>>> <https://groups.google.com/d/msgid/golang-nuts/CAB9V516cRxPc8xuQcXQyBGXZWenv0o9ned%2BFDq2WmXyhBNm2Sg%40mail.gmail.com?utm_medium=email&utm_source=footer>
>>> .
>>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/537ad21d-4f85-4a23-bf45-89a647ac527a%40googlegroups.com.

Reply via email to