I want to echo what's been said here. Especially about it being the 
standard for all other ORMs. And fast. And flexible. And Jeremy is amazing (you 
should buy his book 
<https://www.packtpub.com/product/polished-ruby-programming/9781801072724>
!).

The big thing difference between Sequel and other ORMs is that it is "SQL 
first" in my mind. ActiveRecord and other ORMs in its heritage (looking at 
you Django) try to hide the underlying database from you and do a lot in 
Ruby. Sequel does not, at least not out of the box. For example, if you 
want a cascading delete for foreign keys, you set that up in the database 
itself; it isn't just nullable FK columns with the delete implemented in 
Ruby. This is a lot more predictable, scalable, and faster. I have almost 
never been surprised by Sequel's implementation in any substantial way.

The only point I'd add is that I find the Sequel internals extremely well 
written, so it's easy to poke around in when you need to. The documentation 
is excellent, though because of the flexibility it is impossible to cover 
all use cases.

It's also quite easy to write plugins and other extensions.
This can counterintuitively be one of the reasons that there seems to be 
less available integrating with Sequel. It's a lot easier to write what you 
need than on more complex ORMs. So there is less impetus to build a gem 
that tries to cover all use cases, you can just build an internal thing 
that does what you need. In 8 years of using Sequel, the only external 
tools I've used are sequel-annotate 
<https://github.com/jeremyevans/sequel-annotate> (which is not a plugin), 
and we've built and then extracted/open-sourced some plugins 
<https://github.com/orgs/lithictech/repositories?q=sequel&type=all&language=&sort=>
 
for state machines, money, timestamptz ranges, and a couple more.

On Tuesday, August 30, 2022 at 8:15:43 AM UTC-7 Joe wrote:

> Hi Esteban,
>
> gencer left quite an email, but I figured I’d chime in too.
>
> Sequel was my savior about 14 years ago when I needed a project (which was 
> in Rails at the time) to talk to two databases, the second of which was 
> MSSQL.  Rails didn’t handle this particularly well at the time, but Sequel 
> handled it without complaint.  Like gencer, I’ve found Sequel to be a joy 
> to work with, so I’ve never had a reason to consider migrating *to* 
> ActiveRecord.
>
> Over the past several of years, I’ve been working in other languages in 
> addition to Ruby, which of course have other ORMs.  Sequel is the standard 
> to which I hold all of them, which is dangerous, because it is just so damn 
> good.
>
> To answer your question, though, my big issues with Sequel are usually 
> understanding parts and pieces of it.  Once upon a time, I didn’t 
> understand how to utilize eager loading, nor why you shouldn’t use your 
> model in a migration.
> Well, and that it’s ruined other ORMs for me.
>
> -Joe
>
> On Aug 29, 2022, at 5:03 PM, Esteban <[email protected]> wrote:
>
> I just joined a startup that's been using Sequel instead of ActiveRecord, 
> and I'd never heard of Sequel before joining. I'm really impressed with the 
> stability and speed of Sequel over ActiveRecord. Good Job Jeremy.
>
> One potential issue I've noticed has been integration with gems which 
> assume everyone uses ActiveRecord. It looks like sequal-papertrail 
> <https://github.com/lazebny/sequel_paper_trail>, a gem for tracking 
> changes to models, is five years out of date. Devise, a gem for 
> authentication, occasionally has regressions 
> <https://github.com/heartcombo/devise/search?q=sequel&type=issues>.
>
> What have been your big issues with Sequel? Has anyone ever migrated from 
> Sequel to ActiveRecord?
>
> -- 
> You received this message because you are subscribed to the Google Groups 
> "sequel-talk" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected].
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/sequel-talk/d3fd5784-745f-453a-9b39-5b50b14c2a21n%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/sequel-talk/d3fd5784-745f-453a-9b39-5b50b14c2a21n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"sequel-talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sequel-talk/7b2a75a1-5796-4c6a-994d-f625e09042cen%40googlegroups.com.

Reply via email to