rasdaman API
partinsert.hh
Go to the documentation of this file.
1 /*
2 * This file is part of rasdaman community.
3 *
4 * Rasdaman community is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation, either version 3 of the License, or
7 * (at your option) any later version.
8 *
9 * Rasdaman community is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with rasdaman community. If not, see <http://www.gnu.org/licenses/>.
16 *
17 * Copyright 2003, 2004, 2005, 2006, 2007, 2008, 2009 Peter Baumann /
18 rasdaman GmbH.
19 *
20 * For more information please see <http://www.rasdaman.org>
21 * or contact Peter Baumann via <baumann@rasdaman.com>.
22 /
33 #ifndef _R_PARTIAL_INSERT_
34 #define _R_PARTIAL_INSERT_
35 
36 
37 #include "raslib/mddtypes.hh"
38 #include "raslib/oid.hh"
39 #include "rasodmg/transaction.hh"
40 
41 
42 class r_Minterval;
43 class r_Storage_Layout;
44 class r_GMarray;
45 class r_Database;
46 
47 
48 //@ManMemo: {\bf rasodmg}
49 
50 /*@Doc:
51  Class for inserting an MDD into the database stripwise, as in most of
52  our insert tools.
53 */
54 
58 class r_Partial_Insert
59 {
60 public:
62  r_Partial_Insert( r_Database &usedb, const char *collname, const char *mddtype,
63  const char *settype, const r_Storage_Layout &stl );
65  r_Partial_Insert( r_Database &usedb, const char *collname, const char *mddtype,
66  const char *settype, const r_Minterval &dom, unsigned int tsize );
68  r_Partial_Insert( const r_Partial_Insert &src );
70  ~r_Partial_Insert( void );
71 
73  int update( r_GMarray *mddPtr,
74  r_Data_Format transferFormat = r_Array,
75  const char* transferFormatParams = NULL,
76  r_Data_Format storageFormat = r_Array,
77  const char* storageFormatParams = NULL
78  );
79  /*
80  The marray may be modified in small aspects such as base type name and storage layout.
81  The "transferFormat, transferFormatParams" are used to set the transfer compression used
82  for the communications of client with the server.
83  The "storageFormat, storageFormatParams" are used to set the storage format used for
84  MDD created by the client in the RasDaMan database.
85  */
86 
87 protected:
89  void init_share( const char *collname, const char *mddtype, const char *settype );
90 
92  r_OId myOId;
94  char *collName;
96  char *mddType;
98  char *setType;
100  r_Database &mydb;
102  r_Storage_Layout *mystl;
104  r_Transaction myta;
106  int doUpdate;
108  static const char *format_create;
109  static const char *format_update;
110 };
111 
112 #endif