@@ -79,7 +79,7 @@ class db_deleter_by_id_t
7979 * There is a trade-off here between sending as few DELETE SQL as
8080 * possible and keeping the size of the deletable vector managable.
8181 */
82- static constexpr std::size_t Max_entries = 1000000 ;
82+ static constexpr std::size_t MAX_ENTRIES = 1000000 ;
8383
8484public:
8585 bool has_data () const noexcept { return !m_deletables.empty (); }
@@ -89,7 +89,7 @@ class db_deleter_by_id_t
8989 void delete_rows (std::string const &table, std::string const &column,
9090 pg_conn_t const &db_connection);
9191
92- bool is_full () const noexcept { return m_deletables.size () > Max_entries ; }
92+ bool is_full () const noexcept { return m_deletables.size () > MAX_ENTRIES ; }
9393
9494private:
9595 // / Vector with object to delete before copying
@@ -105,7 +105,7 @@ class db_deleter_by_type_and_id_t
105105 * There is a trade-off here between sending as few DELETE SQL as
106106 * possible and keeping the size of the deletable vector managable.
107107 */
108- static constexpr std::size_t Max_entries = 1000000 ;
108+ static constexpr std::size_t MAX_ENTRIES = 1000000 ;
109109
110110 struct item_t
111111 {
@@ -129,7 +129,7 @@ class db_deleter_by_type_and_id_t
129129 void delete_rows (std::string const &table, std::string const &column,
130130 pg_conn_t const &db_connection);
131131
132- bool is_full () const noexcept { return m_deletables.size () > Max_entries ; }
132+ bool is_full () const noexcept { return m_deletables.size () > MAX_ENTRIES ; }
133133
134134private:
135135 // / Vector with object to delete before copying
@@ -145,7 +145,7 @@ struct db_cmd_copy_t
145145 * to speed up processing. Currently a one-size fits all value.
146146 * Needs more testing and individual values per queue.
147147 */
148- static constexpr std::size_t Max_buf_size = 10 * 1024 * 1024 ;
148+ static constexpr std::size_t MAX_BUF_SIZE = 10 * 1024 * 1024 ;
149149
150150 /* *
151151 * Maximum length of the queue with COPY data.
@@ -155,7 +155,7 @@ struct db_cmd_copy_t
155155 * be full and it is better to keep the queue smaller to reduce memory
156156 * usage. Current value is just assumed to be a reasonable trade off.
157157 */
158- static constexpr std::size_t Max_buffers = 10 ;
158+ static constexpr std::size_t MAX_BUFFERS = 10 ;
159159
160160 // / Name of the target table for the copy operation
161161 std::shared_ptr<db_target_descr_t > target;
@@ -167,7 +167,7 @@ struct db_cmd_copy_t
167167 explicit db_cmd_copy_t (std::shared_ptr<db_target_descr_t > t)
168168 : target(std::move(t))
169169 {
170- buffer.reserve (Max_buf_size );
170+ buffer.reserve (MAX_BUF_SIZE );
171171 }
172172
173173 explicit operator bool () const noexcept { return target != nullptr ; }
@@ -182,7 +182,7 @@ class db_cmd_copy_delete_t : public db_cmd_copy_t
182182 // / Return true if the buffer is filled up.
183183 bool is_full () const noexcept
184184 {
185- return (buffer.size () > Max_buf_size - 100 ) || m_deleter.is_full ();
185+ return (buffer.size () > MAX_BUF_SIZE - 100 ) || m_deleter.is_full ();
186186 }
187187
188188 bool has_deletables () const noexcept { return m_deleter.has_data (); }
0 commit comments