Stroika Library 3.0d23
 
Loading...
Searching...
No Matches
Document/SQLite.inl
1/*
2 * Copyright(c) Sophist Solutions, Inc. 1990-2026. All rights reserved
3 */
4
6
7namespace Stroika::Foundation::Database::Document::SQLite {
8
9#if qStroika_HasComponent_sqlite
10 /*
11 ********************************************************************************
12 ****************************** SQLite::CompiledOptions *************************
13 ********************************************************************************
14 */
15 inline constexpr CompiledOptions CompiledOptions::kThe{
16#ifdef SQLITE_ENABLE_NORMALIZE
17 .ENABLE_NORMALIZE = true
18#else
19 .ENABLE_NORMALIZE = false
20#endif
21#ifdef SQLITE_THREADSAFE
22 ,
23 .THREADSAFE = SQLITE_THREADSAFE
24#elif defined(THREADSAFE)
25 ,
26 .THREADSAFE = THREADSAFE
27#else
28 , .THREADSAFE = 1
29#endif
30 };
31
32 /*
33 ********************************************************************************
34 ****************************** SQLite::Connection::Ptr *************************
35 ********************************************************************************
36 */
37 inline Connection::Ptr::Ptr (const Ptr& src)
38 : Ptr{Debug::UncheckedDynamicPointerCast<IRep> (src)}
39 {
40 }
41 inline Connection::Ptr::Ptr (nullptr_t)
42 : Ptr{shared_ptr<IRep>{nullptr}}
43 {
44 }
45 inline Connection::Ptr& Connection::Ptr::operator= (const Ptr& src)
46 {
47 inherited::operator= (src);
48 return *this;
49 }
50 inline Connection::Ptr& Connection::Ptr::operator= (Ptr&& src) noexcept
51 {
52 inherited::operator= (move (src));
53 return *this;
54 }
55 inline Connection::IRep* Connection::Ptr::operator->() const noexcept
56 {
57 return Debug::UncheckedDynamicPointerCast<IRep> (*this).get ();
58 }
59 inline void Connection::Ptr::Exec (const String& sql)
60 {
61 this->operator->()->Exec (sql);
62 }
63#endif
64
65}
std::shared_ptr< T > UncheckedDynamicPointerCast(const std::shared_ptr< T1 > &arg) noexcept
Produce the same result as dynamic_pointer_cast if the successful case (non-null) - with better perfo...
Definition Cast.inl:42