cid#1607171 Data race condition
[LibreOffice.git] / odk / examples / DevelopersGuide / Database / DriverSkeleton / SResultSetMetaData.cxx
blob32e8dc0f4543cb4ff82a5139df2189593cdf5f63
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*************************************************************************
4 * The Contents of this file are made available subject to the terms of
5 * the BSD license.
7 * Copyright 2000, 2010 Oracle and/or its affiliates.
8 * All rights reserved.
10 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted provided that the following conditions
12 * are met:
13 * 1. Redistributions of source code must retain the above copyright
14 * notice, this list of conditions and the following disclaimer.
15 * 2. Redistributions in binary form must reproduce the above copyright
16 * notice, this list of conditions and the following disclaimer in the
17 * documentation and/or other materials provided with the distribution.
18 * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
19 * contributors may be used to endorse or promote products derived
20 * from this software without specific prior written permission.
22 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
23 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
24 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
25 * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
26 * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
27 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
28 * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
29 * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
30 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
31 * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
32 * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
34 *************************************************************************/
36 #include "SResultSetMetaData.hxx"
38 using namespace connectivity::skeleton;
39 using namespace com::sun::star::uno;
40 using namespace com::sun::star::lang;
41 using namespace com::sun::star::sdbc;
44 OResultSetMetaData::~OResultSetMetaData()
49 sal_Int32 SAL_CALL OResultSetMetaData::getColumnDisplaySize( sal_Int32 column )
51 return 50;
55 sal_Int32 SAL_CALL OResultSetMetaData::getColumnType( sal_Int32 column )
57 sal_Int32 nType = 0;
58 return nType;
62 sal_Int32 SAL_CALL OResultSetMetaData::getColumnCount( )
64 // this makes no sense here so you have to change this
65 return 0;
69 sal_Bool SAL_CALL OResultSetMetaData::isCaseSensitive( sal_Int32 column )
71 return sal_True;
75 ::rtl::OUString SAL_CALL OResultSetMetaData::getSchemaName( sal_Int32 column )
77 return ::rtl::OUString();
81 ::rtl::OUString SAL_CALL OResultSetMetaData::getColumnName( sal_Int32 column )
83 return ::rtl::OUString("Column") + ::rtl::OUString::number(column);
86 ::rtl::OUString SAL_CALL OResultSetMetaData::getTableName( sal_Int32 column )
88 return ::rtl::OUString();
91 ::rtl::OUString SAL_CALL OResultSetMetaData::getCatalogName( sal_Int32 column )
93 return ::rtl::OUString();
96 ::rtl::OUString SAL_CALL OResultSetMetaData::getColumnTypeName( sal_Int32 column )
98 return ::rtl::OUString();
101 ::rtl::OUString SAL_CALL OResultSetMetaData::getColumnLabel( sal_Int32 column )
103 return ::rtl::OUString();
106 ::rtl::OUString SAL_CALL OResultSetMetaData::getColumnServiceName( sal_Int32 column )
108 return ::rtl::OUString();
112 sal_Bool SAL_CALL OResultSetMetaData::isCurrency( sal_Int32 column )
114 return sal_False;
118 sal_Bool SAL_CALL OResultSetMetaData::isAutoIncrement( sal_Int32 column )
120 return sal_False;
124 sal_Bool SAL_CALL OResultSetMetaData::isSigned( sal_Int32 column )
126 return sal_False;
129 sal_Int32 SAL_CALL OResultSetMetaData::getPrecision( sal_Int32 column )
131 return 0;
134 sal_Int32 SAL_CALL OResultSetMetaData::getScale( sal_Int32 column )
136 return 0;
140 sal_Int32 SAL_CALL OResultSetMetaData::isNullable( sal_Int32 column )
142 return 0;
146 sal_Bool SAL_CALL OResultSetMetaData::isSearchable( sal_Int32 column )
148 return sal_True;
152 sal_Bool SAL_CALL OResultSetMetaData::isReadOnly( sal_Int32 column )
154 return sal_True;
158 sal_Bool SAL_CALL OResultSetMetaData::isDefinitelyWritable( sal_Int32 column )
160 return sal_False;
164 sal_Bool SAL_CALL OResultSetMetaData::isWritable( sal_Int32 column )
166 return sal_False;
170 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */