6 |
|
|
7 |
|
#include <menes/standard.hh> |
8 |
|
|
9 |
< |
#include <menes-dbi/resultset.hpp> |
9 |
> |
#include <menes/dbi/resultset.hpp> |
10 |
|
|
11 |
|
#include "MediaFolder.hpp" |
12 |
|
|
13 |
< |
MediaFolder::MediaFolder(_R<dbi::Connection>& connection, const api::Path& path) : connection(connection), path(path) |
13 |
> |
MediaFolder::MediaFolder(const _R<dbi::Connection>& connection, const api::Path& path) : connection(connection), path(path) |
14 |
|
{ |
15 |
|
_R<dbi::ResultSet> root_(connection->Parse(_B("SELECT root FROM folders WHERE path = ?"))->Execute(path.GetPath())); |
16 |
|
|
17 |
|
if (root_->MoveNext()) |
18 |
|
root = root_->GetString(_B("root")); |
19 |
– |
else |
20 |
– |
throw; |
19 |
|
} |
20 |
|
|
21 |
< |
MediaFolder::MediaFolder(_R<dbi::Connection>& connection, const api::Path& path, const api::Path& root) : connection(connection), path(path), root(root) |
21 |
> |
MediaFolder::MediaFolder(const _R<dbi::Connection>& connection, const api::Path& path, const api::Path& root) : connection(connection), path(path), root(root) |
22 |
|
{ |
23 |
|
_R<dbi::ResultSet> path_(connection->Parse(_B("SELECT path FROM folders WHERE path = ?"))->Execute(path.GetPath())); |
24 |
|
|