Commit 17bebfc
refactor: replace env vars in example with hardcoded constants
basic_query.cpp now uses named constants (k_host, k_port, k_database,
k_user, k_password) at the top of the file instead of reading five
environment variables at runtime. The config_from_env() helper and its
early-exit error path are removed. Users adjust the constants directly
before building.
Also commit the in-progress sql.hpp change (on_duplicate_key_update now
returns insert_into_upsert_builder<T> with build_sql() instead of a
raw std::string) and update the corresponding unit test to call
.build_sql(), keeping it consistent with the rest of the builder API.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent c3b24a8 commit 17bebfc
3 files changed
Lines changed: 45 additions & 56 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
| 15 | + | |
| 16 | + | |
24 | 17 | | |
25 | 18 | | |
26 | 19 | | |
27 | 20 | | |
28 | 21 | | |
29 | 22 | | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
30 | 35 | | |
31 | 36 | | |
32 | 37 | | |
| |||
62 | 67 | | |
63 | 68 | | |
64 | 69 | | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | | - | |
85 | | - | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | | - | |
95 | | - | |
96 | | - | |
97 | | - | |
98 | 70 | | |
99 | 71 | | |
100 | 72 | | |
101 | 73 | | |
102 | 74 | | |
103 | | - | |
104 | | - | |
105 | | - | |
106 | | - | |
107 | | - | |
108 | | - | |
109 | | - | |
110 | | - | |
111 | 75 | | |
112 | | - | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
113 | 82 | | |
114 | 83 | | |
115 | 84 | | |
116 | 85 | | |
117 | 86 | | |
118 | | - | |
| 87 | + | |
119 | 88 | | |
120 | 89 | | |
121 | 90 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1817 | 1817 | | |
1818 | 1818 | | |
1819 | 1819 | | |
| 1820 | + | |
| 1821 | + | |
| 1822 | + | |
| 1823 | + | |
| 1824 | + | |
| 1825 | + | |
| 1826 | + | |
| 1827 | + | |
| 1828 | + | |
| 1829 | + | |
| 1830 | + | |
| 1831 | + | |
| 1832 | + | |
| 1833 | + | |
| 1834 | + | |
| 1835 | + | |
| 1836 | + | |
| 1837 | + | |
| 1838 | + | |
| 1839 | + | |
| 1840 | + | |
1820 | 1841 | | |
1821 | 1842 | | |
1822 | 1843 | | |
| |||
1828 | 1849 | | |
1829 | 1850 | | |
1830 | 1851 | | |
1831 | | - | |
| 1852 | + | |
1832 | 1853 | | |
1833 | | - | |
1834 | 1854 | | |
1835 | 1855 | | |
1836 | 1856 | | |
| |||
1842 | 1862 | | |
1843 | 1863 | | |
1844 | 1864 | | |
1845 | | - | |
| 1865 | + | |
1846 | 1866 | | |
1847 | 1867 | | |
1848 | 1868 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
322 | 322 | | |
323 | 323 | | |
324 | 324 | | |
325 | | - | |
| 325 | + | |
326 | 326 | | |
327 | 327 | | |
328 | 328 | | |
| |||
0 commit comments