Loading...
Searching...
No Matches
sqlite::view Struct Reference

view is used to create views. In SQLite a view can only be queried. INSERT, DELETE and UPDATE will fail on a view More...

`#include <view.hpp>`

Collaboration diagram for sqlite::view:

## Public Member Functions

| view (connection &con)
| constructor
| ~view ()
| destructor
void | create (bool temporary, std::string const &alias, std::string const &sql_query)
| creates a view
void | create (bool temporary, std::string const &database, std::string const &alias, std::string const &sql_query)
| creates a view
void | drop (std::string const &alias)
| drops a view
void | drop (std::string const &database, std::string const &alias)
| drops a view

## Private Attributes

connection & | m_con

## Detailed Description

view is used to create views. In SQLite a view can only be queried. INSERT, DELETE and UPDATE will fail on a view

Definition at line 39 of file view.hpp.

## Constructor & Destructor Documentation

## view()

sqlite::view::view | ( | connection & | con | ) |

constructor

Parameters

  con | a reference to the connection object which should be used

## ~view()

sqlite::view::~view | ( |  | ) |

destructor

## Member Function Documentation

## create() [1/2]

void sqlite::view::create | ( | bool | temporary,
|  | std::string const & | alias,
|  | std::string const & | sql_query )

creates a view

Parameters

  temporary | if this parameter is true the view will be present until drop will be called or the database was closed
  alias | the name of this view which should be used
  sql_query | the SQL statement which represents the view

## create() [2/2]

void sqlite::view::create | ( | bool | temporary,
|  | std::string const & | database,
|  | std::string const & | alias,
|  | std::string const & | sql_query )

creates a view

Parameters

  temporary | if this parameter is true the view will be present until drop will be called or the database was closed
  database | name of the database where the view should be created in
  alias | the name of this view which should be used
  sql_query | the SQL statement which represents the view

## drop() [1/2]

void sqlite::view::drop | ( | std::string const & | alias | ) |

drops a view

Parameters

  alias | name of the view which should be dropped

## drop() [2/2]

void sqlite::view::drop | ( | std::string const & | database,
|  | std::string const & | alias )

drops a view

Parameters

  database | name of the database where the view was created in
  alias | name of the view which should be dropped

## Member Data Documentation

## m_con

connection& sqlite::view::m_con

private

Definition at line 86 of file view.hpp.

The documentation for this struct was generated from the following file:

- include/sqlite/view.hpp