DatabaseProcApplicationCreatedLinks
sybsystemprocssp_jdbc_getattributes  14 déc. 14Defects Propagation Dependencies

1     
2     /* end of dbo.sp_jdbc_getsupertables */
3     
4     
5     
6     /* Don't delete the following line. This is where sp_jdbc_getattributes get inserted. */
7     /*** ADDPOINT_ATTRIBUTES ***/
8     
9     /* 
10    ** JDBC 3.0
11    ** 
12    ** DatabaseMetaData.getAttributes(catalog, schemaPattern, typeNamePattern, attributeNamePattern)
13    **
14    */
15    
16    create or replace procedure sp_jdbc_getattributes(
17        @attribute_qualifier varchar(32) = NULL,
18        @attribute_owner varchar(32) = NULL,
19        @type_name_pattern varchar(255) = NULL,
20        @attribute_name_pattern varchar(255) = NULL)
21    
22    as
23        declare @empty_string varchar(1)
24    
25        select @empty_string = ''
26    
27        /* Return an empty result set */
28        select
29            TYPE_CAT = convert(varchar, @empty_string),
30            TYPE_SCHEM = convert(varchar, @empty_string),
31            TYPE_NAME = convert(varchar, @empty_string),
32            ATTR_NAME = convert(varchar, @empty_string),
33            DATA_TYPE = convert(int, 0),
34            ATTR_TYPE_NAME = convert(varchar, @empty_string),
35            ATTR_SIZE = convert(int, 0),
36            DECIMAL_DIGITS = convert(int, 0),
37            NUM_PREC_RADIX = convert(int, 0),
38            NULLABLE = convert(int, 2),
39            REMARKS = convert(varchar, @empty_string),
40            ATTR_DEF = convert(varchar, @empty_string),
41            SQL_DATA_TYPE = convert(int, 0),
42            SQL_DATETIME_SUB = convert(int, 0),
43            CHAR_OCTET_LENGTH = convert(int, 0),
44            ORDINAL_POSITION = convert(int, 0),
45            IS_NULLABLE = convert(varchar, @empty_string),
46            SCOPE_CATALOG = convert(varchar, @empty_string),
47            SCOPE_SCHEMA = convert(varchar, @empty_string),
48            SCOPE_TABLE = convert(varchar, @empty_string),
49            SOURCE_DATA_TYPE = convert(smallint, 0)
50        where
51            1 = 2
52    


exec sp_procxmode 'sp_jdbc_getattributes', 'AnyMode'
go

Grant Execute on sp_jdbc_getattributes to public
go
RESULT SETS
sp_jdbc_getattributes_rset_001

DEFECTS
 MEST 4 Empty String will be replaced by Single Space 25
 MGTP 3 Grant to public sybsystemprocs..sp_jdbc_getattributes  
 MUCO 3 Useless Code Useless Brackets in create proc 16
 QPNC 3 No column in condition 51
 MRST 2 Result Set Marker 28
 MTR1 2 Metrics: Comments Ratio Comments: 16% 16
 MTR2 2 Metrics: Cyclomatic Complexity Cyclo: 2 = 1dec - 1exi + 2 16
 MTR3 2 Metrics: Query Complexity Complexity: 5 16

DEPENDENCIES
PROCS AND TABLES USED
writes table sybsystemprocs..sp_jdbc_getattributes_rset_001