1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 
24 #include "SResultSetMetaData.hxx"
25 
26 using namespace connectivity::skeleton;
27 using namespace com::sun::star::uno;
28 using namespace com::sun::star::lang;
29 using namespace com::sun::star::sdbc;
30 
31 // -------------------------------------------------------------------------
~OResultSetMetaData()32 OResultSetMetaData::~OResultSetMetaData()
33 {
34 }
35 // -------------------------------------------------------------------------
36 // -------------------------------------------------------------------------
getColumnDisplaySize(sal_Int32 column)37 sal_Int32 SAL_CALL OResultSetMetaData::getColumnDisplaySize( sal_Int32 column ) throw(SQLException, RuntimeException)
38 {
39 	return 50;
40 }
41 // -------------------------------------------------------------------------
42 
getColumnType(sal_Int32 column)43 sal_Int32 SAL_CALL OResultSetMetaData::getColumnType( sal_Int32 column ) throw(SQLException, RuntimeException)
44 {
45 	sal_Int32 nType = 0;
46 	return nType;
47 }
48 // -------------------------------------------------------------------------
49 
getColumnCount()50 sal_Int32 SAL_CALL OResultSetMetaData::getColumnCount(  ) throw(SQLException, RuntimeException)
51 {
52 	// this make no sense here so you have to change this
53 	return 0;
54 }
55 // -------------------------------------------------------------------------
56 
isCaseSensitive(sal_Int32 column)57 sal_Bool SAL_CALL OResultSetMetaData::isCaseSensitive( sal_Int32 column ) throw(SQLException, RuntimeException)
58 {
59 	return sal_True;
60 }
61 // -------------------------------------------------------------------------
62 
getSchemaName(sal_Int32 column)63 ::rtl::OUString SAL_CALL OResultSetMetaData::getSchemaName( sal_Int32 column ) throw(SQLException, RuntimeException)
64 {
65 	return ::rtl::OUString();
66 }
67 // -------------------------------------------------------------------------
68 
getColumnName(sal_Int32 column)69 ::rtl::OUString SAL_CALL OResultSetMetaData::getColumnName( sal_Int32 column ) throw(SQLException, RuntimeException)
70 {
71 	return ::rtl::OUString::createFromAscii("Column") + ::rtl::OUString::valueOf(column);
72 }
73 // -------------------------------------------------------------------------
getTableName(sal_Int32 column)74 ::rtl::OUString SAL_CALL OResultSetMetaData::getTableName( sal_Int32 column ) throw(SQLException, RuntimeException)
75 {
76 	return ::rtl::OUString();
77 }
78 // -------------------------------------------------------------------------
getCatalogName(sal_Int32 column)79 ::rtl::OUString SAL_CALL OResultSetMetaData::getCatalogName( sal_Int32 column ) throw(SQLException, RuntimeException)
80 {
81 	return ::rtl::OUString();
82 }
83 // -------------------------------------------------------------------------
getColumnTypeName(sal_Int32 column)84 ::rtl::OUString SAL_CALL OResultSetMetaData::getColumnTypeName( sal_Int32 column ) throw(SQLException, RuntimeException)
85 {
86 	return ::rtl::OUString();
87 }
88 // -------------------------------------------------------------------------
getColumnLabel(sal_Int32 column)89 ::rtl::OUString SAL_CALL OResultSetMetaData::getColumnLabel( sal_Int32 column ) throw(SQLException, RuntimeException)
90 {
91 	return ::rtl::OUString();
92 }
93 // -------------------------------------------------------------------------
getColumnServiceName(sal_Int32 column)94 ::rtl::OUString SAL_CALL OResultSetMetaData::getColumnServiceName( sal_Int32 column ) throw(SQLException, RuntimeException)
95 {
96 	return ::rtl::OUString();
97 }
98 // -------------------------------------------------------------------------
99 
isCurrency(sal_Int32 column)100 sal_Bool SAL_CALL OResultSetMetaData::isCurrency( sal_Int32 column ) throw(SQLException, RuntimeException)
101 {
102 	return sal_False;
103 }
104 // -------------------------------------------------------------------------
105 
isAutoIncrement(sal_Int32 column)106 sal_Bool SAL_CALL OResultSetMetaData::isAutoIncrement( sal_Int32 column ) throw(SQLException, RuntimeException)
107 {
108 	return sal_False;
109 }
110 // -------------------------------------------------------------------------
111 
112 
isSigned(sal_Int32 column)113 sal_Bool SAL_CALL OResultSetMetaData::isSigned( sal_Int32 column ) throw(SQLException, RuntimeException)
114 {
115 	return sal_False;
116 }
117 // -------------------------------------------------------------------------
getPrecision(sal_Int32 column)118 sal_Int32 SAL_CALL OResultSetMetaData::getPrecision( sal_Int32 column ) throw(SQLException, RuntimeException)
119 {
120 	return 0;
121 }
122 // -----------------------------------------------------------------------------
getScale(sal_Int32 column)123 sal_Int32 SAL_CALL OResultSetMetaData::getScale( sal_Int32 column ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException)
124 {
125 	return 0;
126 }
127 // -------------------------------------------------------------------------
128 
isNullable(sal_Int32 column)129 sal_Int32 SAL_CALL OResultSetMetaData::isNullable( sal_Int32 column ) throw(SQLException, RuntimeException)
130 {
131 	return 0;
132 }
133 // -------------------------------------------------------------------------
134 
isSearchable(sal_Int32 column)135 sal_Bool SAL_CALL OResultSetMetaData::isSearchable( sal_Int32 column ) throw(SQLException, RuntimeException)
136 {
137 	return sal_True;
138 }
139 // -------------------------------------------------------------------------
140 
isReadOnly(sal_Int32 column)141 sal_Bool SAL_CALL OResultSetMetaData::isReadOnly( sal_Int32 column ) throw(SQLException, RuntimeException)
142 {
143 	return sal_True;
144 }
145 // -------------------------------------------------------------------------
146 
isDefinitelyWritable(sal_Int32 column)147 sal_Bool SAL_CALL OResultSetMetaData::isDefinitelyWritable( sal_Int32 column ) throw(SQLException, RuntimeException)
148 {
149 	return sal_False;
150 ;
151 }
152 // -------------------------------------------------------------------------
isWritable(sal_Int32 column)153 sal_Bool SAL_CALL OResultSetMetaData::isWritable( sal_Int32 column ) throw(SQLException, RuntimeException)
154 {
155 	return sal_False;
156 }
157 // -------------------------------------------------------------------------
158 
159