8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-24 21:23:04 +01:00
firebird-mirror/src/dsql/movd.cpp

82 lines
1.8 KiB
C++
Raw Normal View History

2001-05-23 15:26:42 +02:00
/*
* PROGRAM: Dynamic SQL runtime support
* MODULE: movd.cpp
2001-05-23 15:26:42 +02:00
* DESCRIPTION: Data mover and converter and comparator, etc.
*
* The contents of this file are subject to the Interbase Public
* License Version 1.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.Inprise.com/IPL.html
*
* Software distributed under the License is distributed on an
* "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express
* or implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code was created by Inprise Corporation
* and its predecessors. Portions created by Inprise Corporation are
* Copyright (C) Inprise Corporation.
*
* All Rights Reserved.
* Contributor(s): ______________________________________.
*/
#include "firebird.h"
2001-05-23 15:26:42 +02:00
#include "../jrd/common.h"
2004-04-29 00:00:03 +02:00
#include <stdio.h>
2001-05-23 15:26:42 +02:00
#include <string.h>
#include "../dsql/dsql.h"
#include "gen/iberror.h"
2008-02-28 14:48:16 +01:00
#include "../jrd/jrd.h"
#include "../jrd/cvt_proto.h"
2001-05-23 15:26:42 +02:00
#include "../dsql/errd_proto.h"
#include "../dsql/movd_proto.h"
#include "../common/cvt.h"
2001-05-23 15:26:42 +02:00
2008-02-28 14:48:16 +01:00
using namespace Jrd;
using namespace Firebird;
2008-02-28 14:48:16 +01:00
static void post_error(const Arg::StatusVector&);
2001-05-23 15:26:42 +02:00
2009-09-05 20:18:44 +02:00
static EngineCallbacks dsqlCallbacks(post_error);
2001-05-23 15:26:42 +02:00
/**
2008-12-05 02:20:14 +01:00
MOVD_move
2008-12-05 02:20:14 +01:00
@brief Move (and possible convert) something to something else.
2008-12-05 02:20:14 +01:00
@param from
@param to
**/
2003-10-05 08:27:16 +02:00
void MOVD_move(const dsc* from, dsc* to)
2001-05-23 15:26:42 +02:00
{
2009-09-05 20:18:44 +02:00
CVT_move_common(from, to, &dsqlCallbacks);
2001-05-23 15:26:42 +02:00
}
/**
2008-12-05 02:20:14 +01:00
post_error
2008-12-05 02:20:14 +01:00
@brief A conversion error occurred. Complain.
2008-12-05 02:20:14 +01:00
@param status
2008-12-05 02:20:14 +01:00
@param
**/
static void post_error(const Arg::StatusVector& v)
2001-05-23 15:26:42 +02:00
{
Arg::Gds status_vector(isc_dsql_error);
status_vector << Arg::Gds(isc_sqlerr) << Arg::Num(-303);
status_vector.append(v);
2001-05-23 15:26:42 +02:00
ERRD_punt(status_vector.value());
2001-05-23 15:26:42 +02:00
}