Public Member Functions

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

List of all members.

Public Member Functions

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

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