Stroika Library 3.0d16
 
Loading...
Searching...
No Matches
SQLite.inl
1/*
2 * Copyright(c) Sophist Solutions, Inc. 1990-2025. All rights reserved
3 */
4
6
7namespace Stroika::Foundation::Database::SQL::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 .ENABLE_JSON1 = true};
32
33 /*
34 ********************************************************************************
35 ****************************** SQLite::Connection::Ptr *************************
36 ********************************************************************************
37 */
38 inline Connection::Ptr::Ptr (const Ptr& src)
39 : Ptr{Debug::UncheckedDynamicPointerCast<IRep> (src._fRep)}
40 {
41 }
42 inline Connection::Ptr& Connection::Ptr::operator= (const Ptr& src)
43 {
44 inherited::operator= (src);
45 return *this;
46 }
47 inline Connection::Ptr& Connection::Ptr::operator= (Ptr&& src) noexcept
48 {
49 inherited::operator= (move (src));
50 return *this;
51 }
52 inline Connection::IRep* Connection::Ptr::operator->() const noexcept
53 {
54 return Debug::UncheckedDynamicPointerCast<IRep> (_fRep).get ();
55 }
56 inline ::sqlite3* Connection::Ptr::Peek () const
57 {
58 return Debug::UncheckedDynamicPointerCast<IRep> (_fRep)->Peek ();
59 }
60#endif
61
62}
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