/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * This file is part of the LibreOffice project. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. * * This file incorporates work covered by the following license notice: * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed * with this work for additional information regarding copyright * ownership. The ASF licenses this file to you under the Apache * License, Version 2.0 (the "License"); you may not use this file * except in compliance with the License. You may obtain a copy of * the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
switch(_rValue.getTypeKind())
{ case DataType::DECIMAL: case DataType::NUMERIC:
_xParameter->updateNumericObject(nPos,_rValue.makeAny(),m_xSetMetaData->getScale(nPos)); break; case DataType::CHAR: case DataType::VARCHAR:
_xParameter->updateString(nPos,_rValue.getString()); break; case DataType::BIGINT: if ( _rValue.isSigned() )
_xParameter->updateLong(nPos,_rValue.getLong()); else
_xParameter->updateString(nPos,_rValue.getString()); break; case DataType::BIT: case DataType::BOOLEAN:
_xParameter->updateBoolean(nPos,_rValue.getBool()); break; case DataType::TINYINT: if ( _rValue.isSigned() )
_xParameter->updateByte(nPos,_rValue.getInt8()); else
_xParameter->updateShort(nPos,_rValue.getInt16()); break; case DataType::SMALLINT: if ( _rValue.isSigned() )
_xParameter->updateShort(nPos,_rValue.getInt16()); else
_xParameter->updateInt(nPos,_rValue.getInt32()); break; case DataType::INTEGER: if ( _rValue.isSigned() )
_xParameter->updateInt(nPos,_rValue.getInt32()); else
_xParameter->updateLong(nPos,_rValue.getLong()); break; case DataType::FLOAT:
_xParameter->updateFloat(nPos,_rValue.getFloat()); break; case DataType::DOUBLE: case DataType::REAL:
_xParameter->updateDouble(nPos,_rValue.getDouble()); break; case DataType::DATE:
_xParameter->updateDate(nPos,_rValue.getDate()); break; case DataType::TIME:
_xParameter->updateTime(nPos,_rValue.getTime()); break; case DataType::TIMESTAMP:
_xParameter->updateTimestamp(nPos,_rValue.getDateTime()); break; case DataType::BINARY: case DataType::VARBINARY: case DataType::LONGVARBINARY:
_xParameter->updateBytes(nPos,_rValue.getSequence()); break; case DataType::BLOB: case DataType::CLOB:
_xParameter->updateObject(nPos,_rValue.getAny()); break;
}
}
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung ist noch experimentell.