Stroika Library 3.0d16
 
Loading...
Searching...
No Matches
Foundation/Database/SQL/Connection.inl
1/*
2 * Copyright(c) Sophist Solutions, Inc. 1990-2025. All rights reserved
3 */
5
6namespace Stroika::Foundation::Database::SQL::Connection {
7
8 /*
9 ********************************************************************************
10 ****************************** SQL::Connection::Ptr ****************************
11 ********************************************************************************
12 */
13 inline Ptr::Ptr (const Ptr& src)
14 : Ptr{src._fRep}
15 {
16 }
17 inline Ptr::Ptr (const shared_ptr<IRep>& src)
18 : _fRep{src}
19 {
20 }
21 inline Ptr& Ptr::operator= (const Ptr& src)
22 {
23 if (this != &src) {
24 _fRep = src._fRep;
25 }
26 return *this;
27 }
28 inline Ptr& Ptr::operator= (Ptr&& src) noexcept
29 {
30 if (this != &src) {
31 _fRep = move (src._fRep);
32 }
33 return *this;
34 }
35 inline IRep* Ptr::operator->() const noexcept
36 {
37 return _fRep.get ();
38 }
39 inline auto Ptr::operator== (const Ptr& rhs) const
40 {
41 return _fRep == rhs._fRep;
42 }
43 inline bool Ptr::operator== (nullptr_t) const noexcept
44 {
45 return _fRep.get () == nullptr;
46 }
47 inline shared_ptr<const EngineProperties> Ptr::GetEngineProperties () const
48 {
49 return _fRep->GetEngineProperties ();
50 }
51 inline void Ptr::Exec (const String& sql) const
52 {
53 _fRep->Exec (sql);
54 }
55 inline String Ptr::ToString () const
56 {
57 using namespace Characters;
58 return Format ("{}"_f, static_cast<const void*> (_fRep.get ()));
59 }
60
61}
String is like std::u32string, except it is much easier to use, often much more space efficient,...
Definition String.h:201