mastodon.world is one of the many independent Mastodon servers you can use to participate in the fediverse.
Generic Mastodon server for anyone to use.

Server stats:

8.4K
active users

#dbixclass

0 posts0 participants0 posts today
Replied in thread

@peateasea Reading the article it looks like you need to create a PP object and then throw a resultset object at it.

Have you considered extending it that one could load it as a plugin to their resultset (base) class and call a method on any resultset object?

Replied to Demiguise 🇮🇱

@demiguise One more thing: If you want to get more experience with #DBIxClass and how Coocook is using it you could also contribute a small task that involves DBIC.

We always have some issues open labelled with "good first issues" for beginners.
gitlab.com/coocook/coocook/-/i

In particular there’s issue #320 that’s about simply removing some old fallback which allows removing a UNIQUE constraint from the DB.
gitlab.com/coocook/coocook/-/i

If you want to give it a try I’d be glad to help you tackle this 😁

GitLabIssues · Coocook / Coocook · GitLab🧑‍🍳🦉 Web application for collecting recipes and making food plans https://coocook.org/
Replied to Demiguise 🇮🇱

@demiguise If you’re asking to “hear” something about #DBIxClass from me personally:

There’s my 14min talk about database migrations with DBIC (English slides, German talk, no English subtitles yet) from 20th German #Perl Workshop #gpw2018 online. That’s pretty much the toolset Coocook still uses today. Can’t believe this talk was already 7 years ago 🙈
youtube.com/watch?v=iWmVlDXsKF

📢 @dboehmer (that’s me 😁) is also available for hire to do DBIC talks, trainings, consulting </advertisement> 😎

Replied to Demiguise 🇮🇱

@demiguise I still found ORMs in other languages inferior compared to #DBIxClass. Anyway we’ve learned something since the incarnation of DBIC nearly 20 years ago. That’s why Chad Granum started DBIx-QuickORM last year. The repo hasn’t seem activity for some months now but I still hope this project will fly.
metacpan.org/dist/DBIx-QuickOR

MetaCPANDBIx-QuickORM-0.000004Actively maintained Object Relational Mapping that makes getting started Quick and has a rich feature set.
Replied to Demiguise 🇮🇱

@demiguise Unfortunately though the development of #DBIxClass has stalled and there even seems to be unclarity about the project’s ownership and governance. Don’t expect new releases or even further development. This is really a sad state for a framework that I consider one of #Perl’s potential USPs 😔 DBIC is so mature that you can still use it reliably though.

Replied to Demiguise 🇮🇱

@demiguise Well, #DBIxClass has proven to be very stable and powerful. Most often I found a way to implement unusual queries in DBIC and there’s always a workaround possible by using custom #SQL if you give up.

For me the main benefit of using a powerful ORM like DBIC is that you can reuse DB code in OOP fashion. Our Coocook::Schema::Result[Set]:: namespace has many methods providing tiny bits that can be plugged together like building blocks. Plain SQL quickly becomes very repetitive …

Continued thread

At lot has changed in the last 10 years but Coocook always has been a web application based on #Perl with #CatalystFramework and #DBIxClass. These frameworks didn’t move fast but proved to be rock solid! 💪

In the meantime we integrated other components like #Bootstrap and infrastructure like #GitLab with CI and #Docker for easier development (soon: also deployment). Fast moving #Javascript libraries have caused many more problems than the mature Perl ecosystem.

Imagine this situation: I have a Mojolicious app where the unit test suite uses DBIx::Class and DBIx::Class::Fixtures. I want to run Selenium tests with Test::Mojo::Role::Selenium, but that always points at the dev DB and not at the test DB that DBIC created.

Is it possible to tell the running Mojo app to stop using the dev DB (which I don't want to pollute with test data) and instead run with the Fixtures-built test DB (and hence use transactions I can roll back)?

@frew I am using your module DBIx::Class::Helper::ResultSet::IgnoreWantarray and just found it doesn’t make many_to_many() accessors ignore wantarray(). If you add such a relationship and call the accessor in list context you get Result objects.

Do you think the module should take of that?

The wantarray is here: metacpan.org/release/RIBASUSHI

I think the *$meth_name should be replaced by the *$rs_meth_name built by that code. 🤔

metacpan.orglib/DBIx/Class/Relationship/ManyToMany.pm - metacpan.org
Replied in thread

Why we've changed our database schema 26 times until now:
- make Coocook easier to use by simplifying required input
- add new features like organizations (groups of users)
- add missing metadata like creation timestamps

Longer gaps are difficult changes that took long to prepare:
1. add database versioning in the first place
2. drop infamous table "quantities" that connected units that can be converted, like "masses" with lb and kg, etc.🙈
#perl #sql #SchemaVersioning #graph #dbixclass #dbi