/usr/include/ncbi-vdb/vdb/vdb-priv.h is in libncbi-vdb-dev 2.8.1+dfsg-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 | /*===========================================================================
*
* PUBLIC DOMAIN NOTICE
* National Center for Biotechnology Information
*
* This software/database is a "United States Government Work" under the
* terms of the United States Copyright Act. It was written as part of
* the author's official duties as a United States Government employee and
* thus cannot be copyrighted. This software/database is freely available
* to the public for use. The National Library of Medicine and the U.S.
* Government have not placed any restriction on its use or reproduction.
*
* Although all reasonable efforts have been taken to ensure the accuracy
* and reliability of the software and data, the NLM and the U.S.
* Government do not and cannot warrant the performance or results that
* may be obtained by using this software or data. The NLM and the U.S.
* Government disclaim all warranties, express or implied, including
* warranties of performance, merchantability or fitness for any particular
* purpose.
*
* Please cite the author in any work or product based on this material.
*
* ===========================================================================
*
*/
#ifndef _h_vdb_vdb_priv_
#define _h_vdb_vdb_priv_
#ifndef _h_vdb_extern_
#include <vdb/extern.h>
#endif
#ifndef _h_klib_defs_
#include <klib/defs.h>
#endif
#include <stdarg.h>
#ifdef __cplusplus
extern "C" {
#endif
/*--------------------------------------------------------------------------
* forwards
*/
struct KDatabase;
struct KTable;
struct KMetadata;
struct KDBManager;
struct KDirectory;
struct VDBManager;
struct VFSManager;
struct VResolver;
struct VSchema;
struct VTypedef;
struct VDatabase;
struct VTable;
struct VCursor;
struct VCursorParams;
struct VXformInfo;
struct KDataBuffer;
struct KNamelist;
/*--------------------------------------------------------------------------
* VDBManager
*/
/* MakeRsrc
* common make, regardless of library
*/
VDB_EXTERN rc_t CC VDBManagerMakeRsrc ( struct VDBManager **mgr, struct VFSManager * vfs );
/* OpenKDBManager
* returns a new reference to KDBManager used by VDBManager
*/
VDB_EXTERN rc_t CC VDBManagerOpenKDBManagerRead ( struct VDBManager const *self,
struct KDBManager const **kmgr );
VDB_EXTERN rc_t CC VDBManagerOpenKDBManagerUpdate ( struct VDBManager *self,
struct KDBManager **kmgr );
#define VDBManagerGetKDBManagerRead VDBManagerOpenKDBManagerRead
#define VDBManagerGetKDBManagerUpdate VDBManagerOpenKDBManagerUpdate
/* ListExternalSchemaModules
*/
VDB_EXTERN rc_t CC VDBManagerListExternalSchemaModules ( struct VDBManager const *self,
struct KNamelist **list );
/* DisablePagemapThread
* this can cause difficulties for some clients
*/
VDB_EXTERN rc_t CC VDBManagerDisablePagemapThread ( struct VDBManager const *self );
/* DisableFlushThread
* Disable the background cursor flush thread, may be useful when debugging
*/
VDB_EXTERN rc_t CC VDBManagerDisableFlushThread ( struct VDBManager *self );
/* Make with custom VFSManager */
VDB_EXTERN rc_t CC VDBManagerMakeReadWithVFSManager (
struct VDBManager const **mgr,
struct KDirectory const *wd, struct VFSManager *vmgr );
VDB_EXTERN rc_t CC VDBManagerMakeUpdateWithVFSManager (
struct VDBManager **mgr, struct KDirectory *wd, struct VFSManager *vmgr );
/** Reset VResolver to set protected repository context */
VDB_EXTERN rc_t CC VDBManagerSetResolver
( struct VDBManager const * self, struct VResolver * resolver );
/*--------------------------------------------------------------------------
* VSchema
*/
/* DescribeTypedef - PRIVATE
* a type is defined as either:
*/
VDB_EXTERN rc_t CC VSchemaDescribeTypedef ( struct VSchema const *self,
struct VTypedef *def, uint32_t type_id );
/* LastIntrinsicTypeId - PRIVATE
* used to allow cast to intrinsics
*/
VDB_EXTERN uint32_t CC VSchemaLastIntrinsicTypeId ( struct VSchema const *self );
/* ListLegacyTables - PRIVATE
* scan all tables defined in schema
* return the fully-qualified and versioned name of each legacy SRA table
*/
VDB_EXTERN rc_t CC VSchemaListLegacyTables ( struct VSchema const *self, struct KNamelist **list );
/*--------------------------------------------------------------------------
* VDatabase
*/
/* OpenKDatabase
* returns a new reference to underlying KDatabase
*/
VDB_EXTERN rc_t CC VDatabaseOpenKDatabaseRead ( struct VDatabase const *self, struct KDatabase const **kdb );
VDB_EXTERN rc_t CC VDatabaseOpenKDatabaseUpdate ( struct VDatabase *self, struct KDatabase **kdb );
/* IsCSRA
* ask an open database if it conforms to cSRA schema
*/
VDB_EXTERN bool CC VDatabaseIsCSRA ( struct VDatabase const *self );
/*--------------------------------------------------------------------------
* VTable
*/
/* OpenKTable
* returns a new reference to underlying KTable
*/
VDB_EXTERN rc_t CC VTableOpenKTableRead ( struct VTable const *self, struct KTable const **ktbl );
VDB_EXTERN rc_t CC VTableOpenKTableUpdate ( struct VTable *self, struct KTable **ktbl );
#define VTableGetKTableRead VTableOpenKTableRead
#define VTableGetKTableUpdate VTableOpenKTableUpdate
/* DropColumn
*/
VDB_EXTERN rc_t CC VTableDropColumn ( struct VTable *self, const char *name, ... );
VDB_EXTERN rc_t CC VTableVDropColumn ( struct VTable *self, const char *name, va_list args );
/* RenameColumn
*/
VDB_EXTERN rc_t CC VTableRenameColumn ( struct VTable *self, bool force,
const char *from, const char *to );
/* ListPhysColumns
* ListSeededWritableColumns
* avail: 2.4
*/
VDB_EXTERN rc_t CC VTableListPhysColumns ( struct VTable const *self, struct KNamelist **names );
VDB_EXTERN rc_t CC VTableListSeededWritableColumns ( struct VTable *self,
struct KNamelist **names, struct KNamelist const *seed );
/* HasStaticColumn
* given a physical column name, report whether it exists
* and is ( currently ) static
* avail: 2.5
*/
VDB_EXTERN bool CC VTableHasStaticColumn ( struct VTable const *self, const char *name );
VDB_EXTERN bool CC VTableVHasStaticColumn ( struct VTable const *self, const char *name, va_list args );
/* VUntypedTableTest
* support for tables created before embedded schema
*
* "ktbl" [ IN ] - physical table to recognize
*
* "meta" [ IN ] - open metadata for table
*
* returns true if table is recognized
*/
typedef bool ( CC * VUntypedTableTest )
( struct KTable const *ktbl, struct KMetadata const *meta );
/* StoreSchema
* stores current schema definition in metadata
*
* useful if table was opened using a later version of schema than
* was used for its creation.
*/
VDB_EXTERN rc_t VTableStoreSchema ( struct VTable *self );
/*--------------------------------------------------------------------------
* VCursor
*/
/* CreateCursorView
* creates a read-only cursor onto table
* uses table schema as base
* uses view described in viewspec as view
*
* AVAILABILITY: version 2.3
*
* for pre-vdb-2.3 tables, defaults to CreateCursorRead, ignoring
* schema specification
*
* "curs" [ OUT ] - return parameter for newly created cursor
*
* "viewspec" [ IN ] - NUL terminated string describing the view schema
*/
VDB_EXTERN rc_t CC VTableCreateCursorView ( struct VTable const *self,
struct VCursor const **curs, const char *viewspec );
/* PermitPostOpenAdd
* allows columns to be added to open cursor
* for write cursor, the effect lasts until the first row commit
*/
VDB_EXTERN rc_t CC VCursorPermitPostOpenAdd ( struct VCursor const *self );
/* SuspendTriggers
* blocks resolution of schema-based triggers
*
*/
VDB_EXTERN rc_t CC VCursorSuspendTriggers ( struct VCursor const *self );
/* VCursorGetSchema
* returns current schema of the open cursor
*/
VDB_EXTERN struct VSchema const* CC VCursorGetSchema ( struct VCursor const *self);
/* PageIdRange
* returns id range for page
*
* "id" [ IN ] - page containing this row id is target
*
* "first" [ OUT, NULL OKAY ] and "last" [ OUT, NULL OKAY ] -
* id range is returned in these output parameters, where
* at least ONE must be NOT-NULL
*/
VDB_EXTERN rc_t CC VCursorPageIdRange ( struct VCursor const *self,
uint32_t idx, int64_t id, int64_t *first, int64_t *last );
/* IsStaticColumn
* answers question: "does this column have the same value for every cell?"
*/
VDB_EXTERN rc_t CC VCursorIsStaticColumn ( struct VCursor const *self,
uint32_t col_idx, bool *is_static );
VDB_EXTERN rc_t CC VCursorLinkedCursorGet(const struct VCursor *cself,const char *tbl, struct VCursor const **curs);
VDB_EXTERN rc_t CC VCursorLinkedCursorSet(const struct VCursor *cself,const char *tbl, struct VCursor const *curs);
VDB_EXTERN uint64_t CC VCursorSetCacheCapacity(struct VCursor *self,uint64_t capacity);
VDB_EXTERN uint64_t CC VCursorGetCacheCapacity(const struct VCursor *self);
/*--------------------------------------------------------------------------
* VCursorParams
*/
/* Get
* return KDataBuffer value by reference
*/
VDB_EXTERN rc_t CC VCursorParamsGet ( struct VCursorParams const *self,
const char *name, struct KDataBuffer **value );
/* Set
* set a textual parameter value
*/
VDB_EXTERN rc_t CC VCursorParamsSet( struct VCursorParams const *self,
const char *name, const char *fmt, ... );
VDB_EXTERN rc_t CC VCursorParamsVSet ( struct VCursorParams const *self,
const char *name, const char *fmt, va_list args );
/* Unset
* set the value of a named parameter to "undefined"
*/
VDB_EXTERN rc_t CC VCursorParamsUnset ( struct VCursorParams const *self, const char *name );
/*--------------------------------------------------------------------------
* xform
*/
/*
uses vftReserved code
returns little-endian data, no row-wise rle
fixed row-length is calculated as dst->elem_count / num_rows
*/
#define vftLegacyBlob vftReserved
typedef struct VLegacyBlobResult VLegacyBlobResult;
struct VLegacyBlobResult
{
struct KDataBuffer *dst;
uint8_t byte_order;
};
typedef rc_t ( CC * VNoHdrBlobFunc ) ( void *self,
struct VXformInfo const *info, VLegacyBlobResult *rslt,
struct KDataBuffer const *src );
/* function to call to test table against schema */
typedef bool ( CC * VUntypedFunc )
( struct KTable const *tbl, struct KMetadata const *meta );
#ifdef __cplusplus
}
#endif
#endif /* _h_vdb_vdb_priv_ */
|