SimpleOps/DBI/MyPlugin.pm untested

filter: Statementstmt 0.0% 0 / 49 Branchbran n/a Conditioncond 0.0% 0 / 5 MC/DCmcdc n/a Subroutinesub 0.0% 0 / 12 Podpod 0.0% 0 / 8 totaltotal 0.0% 0 / 74 CC 1 SCAR 6.9
CC
1
Cov
0%
new
2.0
Open
2.0
Select
2.0
CRAP 2.0
1 # ABSTRACT SQL Simple Operations Commands
2 #
3 ## LICENSE AND COPYRIGHT
4 #
5 ## Copyright (C) Carlos Celso
6 #
7 ## This program is free software: you can redistribute it and/or modify
8 ## it under the terms of the GNU General Public License as published by
9 ## the Free Software Foundation, either version 3 of the License, or
10 ## (at your option) any later version.
11 #
12 ## This program is distributed in the hope that it will be useful,
13 ## but WITHOUT ANY WARRANTY; without even the implied warranty of
14 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 ## GNU General Public License for more details.
16 #
17 ## You should have received a copy of the GNU General Public License
18 ## along with this program. If not, see L<http://www.gnu.org/licenses/>.
19 #
20  
21 package SQL::SimpleOps::DBI::MyPlugin;
22  
23 use 5.006001;
24 use strict;
25 use warnings;
26 use Exporter;
27  
28 our @ISA = qw ( Exporter );
29  
30 our @EXPORT = qw(new Open Select SelectCursor Delete Insert Update Call $VERSION);
31  
32 our $VERSION = "2023.284.1";
33  
34 our @EXPORT_OK = @EXPORT;
35  
36 our %EXPORT_TAGS = ( all => [@EXPORT_OK] );
37 1;
38  
39 ###############################################################################
40 ## plugin initialization
41  
42 sub new()
43 {
44 my $class = shift; $class = ref($class) || $class || 'SQL::SimpleOps::DBI::MyPlugin';
45 my $self = {@_};
46  
47 # give my plugin name
48 $self->{sql_simple}->{init}{plugin_id} = "MyPlugin";
49
50 # use '1' if your db have schema option format
51 $self->{sql_simple}->{init}{schema} = 1;
52
53 # use '1' if your args must have server/tcport values
54 $self->{sql_simple}->{init}{test_server} = 1;
55
56 # use '1' if between your field/alias infomation have 'as' value
57 $self->{sql_simple}->{init}{alias_with_as} = 0;
58  
59 bless($self,$class);
60 }
61  
62 ###############################################################################
63 ## initialize here the dsname by:
64 #
65 ## All methods can be executed using the format:
66 # $self_sql_simple->[method_name]();
67 #
68 ## return codes:
69 ## rc=0 ok, continue
70 ## rc<1 syntax, abort
71 ## rc=1 error, abort
72 ## rc=2 ok, ignore caller
73  
74 sub Open()
75 {
76 my $self = shift;
77 my $argv = shift;
78  
79 ## sets the dsnam here
80 ## $self->{sql_simple}->{argv}{dsname} = ...
81  
82 return 0;
83 }
84 sub Select()
85 {
86 my $self = shift;
87 my $argv = shift;
88 return 0;
89 }
90 sub SelectCursor()
91 {
92 my $self = shift;
93 my $argv = shift;
94 return 0;
95 }
96 sub Delete()
97 {
98 my $self = shift;
99 my $argv = shift;
100 return 0;
101 }
102 sub Update()
103 {
104 my $self = shift;
105 my $argv = shift;
106 return 0;
107 }
108 sub Call()
109 {
110 my $self = shift;
111 my $argv = shift;
112 return 0;
113 }
114  
115 sub PreFetch()
116 {
117 my $self = shift;
118 my $argv = shift;
119 return 0;
120 }
121  
122 __END__