Public Member Functions | List of all members
AppSecInc::Databases::MSSQL::MSSQLDatabase Class Reference

A Microsoft SQL Server database. More...

#include <MSSQLDatabase.h>

Inheritance diagram for AppSecInc::Databases::MSSQL::MSSQLDatabase:
AppSecInc::Databases::ODBC::ODBCDatabase

Public Member Functions

const std::wstring GetName () const
 get the database name More...
 
void SetName (const std::wstring &value)
 set the database name More...
 
const std::wstring GetCollate () const
 get the database collate More...
 
void SetCollate (const std::wstring &value)
 set the database collate More...
 
const std::wstring GetPurpose () const
 get the database purpose, eg. ATTACH or ATTACH_REBUILD_LOG More...
 
void SetPurpose (const std::wstring &value)
 set the database for More...
 
const std::list
< MSSQLDatabaseFileSpec > & 
GetFileSpecs () const
 get the database file specs More...
 
void AddFileSpec (const MSSQLDatabaseFileSpec &value)
 add a database file spec More...
 
const std::list< std::wstring > & GetOptions () const
 get the database with options More...
 
void AddOption (const std::wstring &value)
 add a database file spec More...
 
AppSecInc::Databases::ODBC::ODBCConnectionGetConnection ()
 returns the connection object More...
 
const
AppSecInc::Databases::ODBC::ODBCConnection
GetConnection () const
 
 MSSQLDatabase ()
 constructors/destructors More...
 
 MSSQLDatabase (const AppSecInc::Databases::ODBC::ODBCConnectionInfo &connectioninfo)
 
void Create ()
 create the database, fail if exists More...
 
bool Exists ()
 returns true if database exists More...
 
void Connect ()
 connect to the database server More...
 
void Disconnect ()
 disconnect from the database server More...
 
void Drop ()
 drop the database More...
 
void CreateIfNotExists ()
 create the database if it doesn't exist More...
 
void DropIfExists ()
 drop the database if it exists More...
 
 ~MSSQLDatabase ()
 
std::wstring GetCreateQuery () const
 
std::vector< std::wstring > GetOptionQueries () const
 
std::wstring GetDropQuery () const
 
std::wstring GetExistsQuery () const
 
std::wstring GetNotExistsQuery () const
 
MSXML2::IXMLDOMNodePtr Save (AppSecInc::Xml::XmlDocument &xmldoc, MSXML2::IXMLDOMNodePtr parent) const
 serialize database to xml More...
 
void Load (AppSecInc::Xml::XmlDocument &xmldoc, MSXML2::IXMLDOMNodePtr root)
 deserialize database from xml More...
 
- Public Member Functions inherited from AppSecInc::Databases::ODBC::ODBCDatabase
 ODBCDatabase ()
 constructor More...
 
virtual ~ODBCDatabase ()
 destructor More...
 

Detailed Description

A Microsoft SQL Server database.

Constructor & Destructor Documentation

MSSQLDatabase::MSSQLDatabase ( )

constructors/destructors

MSSQLDatabase::MSSQLDatabase ( const AppSecInc::Databases::ODBC::ODBCConnectionInfo connectioninfo)
MSSQLDatabase::~MSSQLDatabase ( )

Member Function Documentation

void AppSecInc::Databases::MSSQL::MSSQLDatabase::AddFileSpec ( const MSSQLDatabaseFileSpec value)
inline

add a database file spec

void AppSecInc::Databases::MSSQL::MSSQLDatabase::AddOption ( const std::wstring &  value)
inline

add a database file spec

void MSSQLDatabase::Connect ( )
virtual

connect to the database server

Implements AppSecInc::Databases::ODBC::ODBCDatabase.

void MSSQLDatabase::Create ( )
virtual

create the database, fail if exists

Implements AppSecInc::Databases::ODBC::ODBCDatabase.

void MSSQLDatabase::CreateIfNotExists ( )
virtual

create the database if it doesn't exist

Reimplemented from AppSecInc::Databases::ODBC::ODBCDatabase.

void MSSQLDatabase::Disconnect ( )
virtual

disconnect from the database server

Implements AppSecInc::Databases::ODBC::ODBCDatabase.

void MSSQLDatabase::Drop ( )
virtual

drop the database

Implements AppSecInc::Databases::ODBC::ODBCDatabase.

void MSSQLDatabase::DropIfExists ( )
virtual

drop the database if it exists

Reimplemented from AppSecInc::Databases::ODBC::ODBCDatabase.

bool MSSQLDatabase::Exists ( )
virtual

returns true if database exists

Implements AppSecInc::Databases::ODBC::ODBCDatabase.

const std::wstring AppSecInc::Databases::MSSQL::MSSQLDatabase::GetCollate ( ) const
inline

get the database collate

AppSecInc::Databases::ODBC::ODBCConnection& AppSecInc::Databases::MSSQL::MSSQLDatabase::GetConnection ( )
inline

returns the connection object

const AppSecInc::Databases::ODBC::ODBCConnection& AppSecInc::Databases::MSSQL::MSSQLDatabase::GetConnection ( ) const
inline
std::wstring MSSQLDatabase::GetCreateQuery ( ) const
std::wstring MSSQLDatabase::GetDropQuery ( ) const
std::wstring MSSQLDatabase::GetExistsQuery ( ) const
const std::list<MSSQLDatabaseFileSpec>& AppSecInc::Databases::MSSQL::MSSQLDatabase::GetFileSpecs ( ) const
inline

get the database file specs

const std::wstring AppSecInc::Databases::MSSQL::MSSQLDatabase::GetName ( ) const
inline

get the database name

std::wstring MSSQLDatabase::GetNotExistsQuery ( ) const
std::vector< std::wstring > MSSQLDatabase::GetOptionQueries ( ) const
const std::list<std::wstring>& AppSecInc::Databases::MSSQL::MSSQLDatabase::GetOptions ( ) const
inline

get the database with options

const std::wstring AppSecInc::Databases::MSSQL::MSSQLDatabase::GetPurpose ( ) const
inline

get the database purpose, eg. ATTACH or ATTACH_REBUILD_LOG

void MSSQLDatabase::Load ( AppSecInc::Xml::XmlDocument xmldoc,
MSXML2::IXMLDOMNodePtr  root 
)

deserialize database from xml

MSXML2::IXMLDOMNodePtr MSSQLDatabase::Save ( AppSecInc::Xml::XmlDocument xmldoc,
MSXML2::IXMLDOMNodePtr  parent 
) const

serialize database to xml

void AppSecInc::Databases::MSSQL::MSSQLDatabase::SetCollate ( const std::wstring &  value)
inline

set the database collate

void AppSecInc::Databases::MSSQL::MSSQLDatabase::SetName ( const std::wstring &  value)
inline

set the database name

void AppSecInc::Databases::MSSQL::MSSQLDatabase::SetPurpose ( const std::wstring &  value)
inline

set the database for


The documentation for this class was generated from the following files:


© Application Security Inc. - All Rights Reserved http://msiext.codeplex.com