ALBA
albaRelationalDatabaseAbstractConnector.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: ALBA (Agile Library for Biomedical Applications)
4 Module: albaRelationalDatabaseAbstractConnector
5 Authors: Daniele Giunchi
6
7 Copyright (c) BIC
8 All rights reserved. See Copyright.txt or
9
10
11 This software is distributed WITHOUT ANY WARRANTY; without even
12 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
13 PURPOSE. See the above copyright notice for more information.
14
15=========================================================================*/
16
17#ifndef __albaRelationalDatabaseAbstractConnector_H__
18#define __albaRelationalDatabaseAbstractConnector_H__
19
20//----------------------------------------------------------------------------
21// Include:
22//----------------------------------------------------------------------------
23#include "albaDefines.h"
24#include "albaObject.h"
26
27//----------------------------------------------------------------------------
28// forward references :
29//----------------------------------------------------------------------------
36{
37 std::string m_Url;
38 std::string m_Username;
39 std::string m_Password;
40 std::string m_Certificate;
41 std::string m_ConfName;
42};
49{
50public:
55
58
63
65 void SetQuery(const char* queryString);
67 const char* GetQuery() const;
68
70 virtual void QueryExecute() = 0;
71
73 virtual bool IsFailed() const;
74
76 int GetNumberOfRecords() const;
77
79 int GetNumberOfFields() const;
80
84
88
92
96
97protected:
99
100private:
101 std::string m_Query;
102 albaRelationalDatabaseInformation m_RelationalDatabaseInformation;
103
104};
105#endif //__albaRelationalDatabaseAbstractConnector_H__
std::vector< std::vector< std::string > > WebRowSetStringDataTable
std::vector< std::string > WebRowSetColumnNameVector
std::vector< std::string > WebRowSetColumnTypeVector
std::vector< std::vector< albaQueryObject * > > WebRowSetQueryObjectsTable
Abstract superclass for all ALBA classes implementing RTTI APIs.
Definition: albaObject.h:38
class name : albaRelationalDatabaseAbstractConnector class that handle all the process of connection,...
WebRowSetQueryObjectsTable GetQueryResultAsObjectsMatrix() const
retrieve result in form of object matrix, as WebRowSetQueryObjectsTable (typedef std::vector<std::vec...
WebRowSetColumnTypeVector GetColumnsTypeAsStringVector() const
retrieve result in form of string matrix, as WebRowSetColumnTypeVector (typedef std::vector<std::stri...
int GetNumberOfFields() const
return the number of records in terms of row
const albaRelationalDatabaseInformation & GetRelationalDatabaseInformation() const
Get information for connection to database.
void SetRelationalDatabaseInformation(albaRelationalDatabaseInformation info)
Set information for connection to database.
virtual bool IsFailed() const
check the validation of execution
int GetNumberOfRecords() const
return the number of records in terms of row
virtual void QueryExecute()=0
execute the query
WebRowSetStringDataTable GetQueryResultAsStringMatrix() const
retrieve result in form of string matrix, as WebRowSetStringDataTable (typedef std::vector<std::vecto...
void SetQuery(const char *queryString)
Set the current query that will be used.
WebRowSetColumnNameVector GetColumnsNameAsStringVector() const
retrieve result in form of string matrix, as WebRowSetColumnNameVector (typedef std::vector<std::stri...
virtual ~albaRelationalDatabaseAbstractConnector()
destructor
albaRelationalDatabaseAbstractConnector(const char *query="")
constructor
albaAbstractTypeMacro(albaRelationalDatabaseAbstractConnector, albaObject)
RTTI macro.
const char * GetQuery() const
Get the current query that will be used.
class name: albaResultQueryAbstractHandler Interface for handle results from a query to a database
struct name :albaRelationalDatabaseInformation struct that contains database information useful for c...