EMMA Coverage Report (generated Tue Jul 25 07:27:46 CDT 2006)
[all classes][com.mysql.jdbc]

COVERAGE SUMMARY FOR SOURCE FILE [MysqlParameterMetadata.java]

nameclass, %method, %block, %line, %
MysqlParameterMetadata.java0%   (0/1)0%   (0/11)0%   (0/80)0%   (0/25)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class MysqlParameterMetadata0%   (0/1)0%   (0/11)0%   (0/80)0%   (0/25)
MysqlParameterMetadata (Field [], int): void 0%   (0/1)0%   (0/18)0%   (0/6)
checkAvailable (): void 0%   (0/1)0%   (0/8)0%   (0/3)
getParameterClassName (int): String 0%   (0/1)0%   (0/7)0%   (0/2)
getParameterCount (): int 0%   (0/1)0%   (0/3)0%   (0/1)
getParameterMode (int): int 0%   (0/1)0%   (0/2)0%   (0/1)
getParameterType (int): int 0%   (0/1)0%   (0/7)0%   (0/2)
getParameterTypeName (int): String 0%   (0/1)0%   (0/7)0%   (0/2)
getPrecision (int): int 0%   (0/1)0%   (0/7)0%   (0/2)
getScale (int): int 0%   (0/1)0%   (0/7)0%   (0/2)
isNullable (int): int 0%   (0/1)0%   (0/7)0%   (0/2)
isSigned (int): boolean 0%   (0/1)0%   (0/7)0%   (0/2)

1/*
2   Copyright (C) 2005 MySQL AB
3 
4   This program is free software; you can redistribute it and/or modify
5   it under the terms of version 2 of the GNU General Public License as 
6   published by the Free Software Foundation.
7 
8   There are special exceptions to the terms and conditions of the GPL 
9   as it is applied to this software. View the full text of the 
10   exception in file EXCEPTIONS-CONNECTOR-J in the directory of this 
11   software distribution.
12 
13   This program is distributed in the hope that it will be useful,
14   but WITHOUT ANY WARRANTY; without even the implied warranty of
15   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16   GNU General Public License for more details.
17 
18   You should have received a copy of the GNU General Public License
19   along with this program; if not, write to the Free Software
20   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
21 
22*/
23 
24package com.mysql.jdbc;
25 
26import java.sql.ParameterMetaData;
27import java.sql.SQLException;
28 
29public class MysqlParameterMetadata implements ParameterMetaData {
30        
31        ResultSetMetaData metadata = null;
32        int parameterCount = 0;
33        
34        
35        MysqlParameterMetadata(Field[] fieldInfo, int parameterCount) {
36                this.metadata = new ResultSetMetaData(fieldInfo);
37                
38                this.parameterCount = parameterCount;
39        }
40        
41        public int getParameterCount() throws SQLException {
42                return this.parameterCount;
43        }
44 
45        public int isNullable(int arg0) throws SQLException {
46                checkAvailable();
47                
48                return this.metadata.isNullable(arg0);
49        }
50 
51        private void checkAvailable() throws SQLException {
52                if (this.metadata == null) {
53                        throw SQLError.createSQLException(
54                                "Parameter metadata not available for the given statement",
55                                SQLError.SQL_STATE_DRIVER_NOT_CAPABLE);
56                }
57        }
58 
59        public boolean isSigned(int arg0) throws SQLException {
60                checkAvailable();
61                
62                return (this.metadata.isSigned(arg0));
63        }
64 
65        public int getPrecision(int arg0) throws SQLException {
66                checkAvailable();
67                
68                return (this.metadata.getPrecision(arg0));
69        }
70 
71        public int getScale(int arg0) throws SQLException {
72                checkAvailable();
73                
74                return (this.metadata.getScale(arg0));
75        }
76 
77        public int getParameterType(int arg0) throws SQLException {
78                checkAvailable();
79                
80                return (this.metadata.getColumnType(arg0));
81        }
82 
83        public String getParameterTypeName(int arg0) throws SQLException {
84                checkAvailable();
85                
86                return (this.metadata.getColumnTypeName(arg0));
87        }
88 
89        public String getParameterClassName(int arg0) throws SQLException {
90                checkAvailable();
91                
92                return (this.metadata.getColumnClassName(arg0));
93        }
94 
95        public int getParameterMode(int arg0) throws SQLException {
96                return parameterModeIn;
97        }
98}

[all classes][com.mysql.jdbc]
EMMA 2.0.4217 (C) Vladimir Roubtsov