01: /*
02: * Copyright 2003 (C) TJDO.
03: * All rights reserved.
04: *
05: * This software is distributed under the terms of the TJDO License version 1.0.
06: * See the terms of the TJDO License in the documentation provided with this software.
07: *
08: * $Id: MSSQLServerColumnInfo.java,v 1.1 2003/03/17 07:02:52 jackknifebarber Exp $
09: */
10:
11: package com.triactive.jdo.store;
12:
13: import java.sql.ResultSet;
14: import java.sql.Types;
15:
16: /**
17: * Represents the metadata of a specific table column in MS SQL Server.
18: *
19: * @author <a href="mailto:mmartin5@austin.rr.com">Mike Martin</a>
20: * @version $Revision: 1.1 $
21: */
22:
23: class MSSQLServerColumnInfo extends ColumnInfo {
24: /**
25: * Constructs a column information object from the current row of the given
26: * result set. The {@link ResultSet} object passed must have been obtained
27: * from a call to DatabaseMetaData.getColumns().
28: *
29: * <p>This method only retrieves the values from the current row; the caller
30: * is required to advance to the next row with {@link ResultSet#next}.
31: *
32: * @param rs The result set returned from DatabaseMetaData.getColumns().
33: */
34:
35: public MSSQLServerColumnInfo(ResultSet rs) {
36: super (rs);
37:
38: switch (dataType) {
39: case Types.DATE:
40: case Types.TIME:
41: case Types.TIMESTAMP:
42: /* Values > 0 inexplicably get returned here. */
43: decimalDigits = 0;
44: break;
45:
46: default:
47: break;
48: }
49: }
50: }
|