| 1 | package DBIx::Class::DeploymentHandler::VersionStorage::Standard::VersionResultSet; | ||
| 2 | 10 | $DBIx::Class::DeploymentHandler::VersionStorage::Standard::VersionResultSet::VERSION = '0.002233'; | |
| 3 | # ABSTRACT: Predefined searches to find what you want from the version storage | ||
| 4 | |||
| 5 | 10 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 6 | 10 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 7 | |||
| 8 | 10 | ▶ | use parent 'DBIx::Class::ResultSet'; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 9 | |||
| 10 | 10 | ▶ | use Try::Tiny; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 11 | |||
| 12 | sub version_storage_is_installed { | ||
| 13 | 22 | ▶ | my $self = shift; |
|
Subroutine
version_storage_is_installed: called CC=1 SCAR=0.0
Pod
documented
| |||
| 14 | 21 | ▶ | try { $self->count; 1 } catch { undef } |
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||
| 15 | 22 | } | |
| 16 | |||
| 17 | sub database_version { | ||
| 18 | 31 | ▶ | my $self = shift; |
|
Subroutine
database_version: called CC=1 SCAR=0.0
Pod
documented
| |||
| 19 | 31 | $self->search(undef, { | |
| 20 | order_by => { -desc => 'id' }, | ||
| 21 | rows => 1 | ||
| 22 | })->get_column('version')->next; | ||
| 23 | } | ||
| 24 | |||
| 25 | 10 | 1; | |
| 26 | |||
| 27 | # vim: ts=2 sw=2 expandtab | ||
| 28 | |||
| 29 | __END__ | ||
| 30 | |||
| 31 | =pod | ||
| 32 | |||
| 33 | =head1 NAME | ||
| 34 | |||
| 35 | DBIx::Class::DeploymentHandler::VersionStorage::Standard::VersionResultSet - Predefined searches to find what you want from the version storage | ||
| 36 | |||
| 37 | =head1 METHODS | ||
| 38 | |||
| 39 | =head2 version_storage_is_installed | ||
| 40 | |||
| 41 | True if (!!!) the version storage has been installed | ||
| 42 | |||
| 43 | =head2 database_version | ||
| 44 | |||
| 45 | The version of the database | ||
| 46 | |||
| 47 | =head1 AUTHOR | ||
| 48 | |||
| 49 | Arthur Axel "fREW" Schmidt <frioux+cpan@gmail.com> | ||
| 50 | |||
| 51 | =head1 COPYRIGHT AND LICENSE | ||
| 52 | |||
| 53 | This software is copyright (c) 2019 by Arthur Axel "fREW" Schmidt. | ||
| 54 | |||
| 55 | This is free software; you can redistribute it and/or modify it under | ||
| 56 | the same terms as the Perl 5 programming language system itself. | ||
| 57 | |||
| 58 | =cut | ||