I'm currently doing some research on DBIx::Class in order to migrate my current application from Class::DBI. Honestly I'm a bit disappointed about the DBIx::Class when it comes to configuring the result classes, with Class::DBI I could setup metadata on models just by calling the on function without a code generator and so on my question is ... can I the same thing with DBIX::Class also it seems that client-side triggers are not supported in DBIx::Class or i'm not looking at the wrong docs?
Moving from Class::DBI to DBIx::Class
743 Views Asked by marghi At
1
There are 1 best solutions below
Related Questions in PERL
- Perl Regex for converting query strings
- Cross compiling perl for Android ld.lld: error: unable to find library -lpthread
- Regexp to remove small numbers and leave large ones
- `df` command not capturing entire output in perl
- Webmin CentOS7 AWS backup errors - perl(S3::AWSAuthConnection) can't be installed
- How to ignore perm errors with Path::Tiny 'visit'? (Windows)
- Why does setting `*\` to a scalar (string) reference not result in auto printing
- Regex for deconstructing SQL where statement
- Random characters in DS record from Net::DNS:RR when calling print/string
- Perl with Selenium: cannot save the Web page with Ctrl+S
- openssl pbkdf2 and perl
- Strawberry Perl using a separate winlibs distro
- Perl / Undefined value as a HASH reference when running SNMP queries
- Timestamp with timezone: works with isql but not with DBD::Firebird
- Slurping a file ... syntax error - example from perldoc
Related Questions in DBIX-CLASS
- Getting result rows as array with DBIx::Class?
- Can DBIx:Class optimize a COUNT(*) query and remove JOINs that are not used?
- Can DBIx::Class use the SQL window functions lag and lead?
- Use function value from subquery in WHERE-clause + fetch it with results using DBIx::Class
- Form the proper DBIx::Class syntax to join a table where the foreign key is stored in a one-to-one join of a different foreign table
- DBIx::Class how to retrieve generated UUID on create?
- Catalyst FormFu DBIC error - using dot notation in a resultset
- Dumping db schema using DBIx::Class::Schema::Loader
- recursive_update fails
- How to use recursive_update
- DbiX::Class / Creating tree of test data without persisting
- Querying arbitrary data the way DBIx::Class does
- How to debug DBIx::Class?
- Get created object with all fields
- DBIC virtual view missing data
Related Questions in CLASS-DBI
- How to use Class:DBI with own constructors or OO-systems like Moo(se)?
- Class::DBI - does it load all tables?
- Sorting Perl with Class::DBI
- Perl class::dbi - multiple connections
- How do I access a specific return value from the CDBI::Search function?
- How to identify whether record was found or created: class::dbi find_or_create
- Moving from Class::DBI to DBIx::Class
- Is it possible to obtain the SQL statements generated by Class::DBI?
- What is the future of Class::DBI?
- Is there a way to caching mechanism for Class::DBI?
- How can I do an update in Class::DBI without selecting a record first?
- How do I override autogenerated accessors in Perl's Class::DBI?
- How do I use add_to in Class::DBI?
- How do you insert binary data into a BLOB column with Class::DBI?
- How can I clear Class::DBI's internal cache?
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
Triggers can be implemented by redefining the appropriate method (new/create/update/delete etc) in the Result class, and calling the parent (via
$self->next::method()) within it, either before or after your code. Admittedly it's a bit clumsy compared to the before/after triggers in Class::DBI.As for metadata - are you talking about temporary columns on an object? i.e. data that won't be stored in the database row. These can be added easily using one of the Class::Accessor::* modules on CPAN
One of the hardest changes to make when switching from CDBI to DBIC is to think in terms of ResultSets - often what would have been implemented via a Class method in CDBI becomes a method on a ResultSet - and code may need to be refactored considerably, it's not always a straightforward conversion from one to the other.