16 #include "pqxx/compiler-public.hxx"
17 #include "pqxx/internal/compiler-internal-pre.hxx"
21 #include "pqxx/dbtransaction.hxx"
80 static constexpr std::size_t chunk_limit = 0x7fffffff;
90 std::size_t read(std::basic_string<std::byte> &buf, std::size_t size);
111 void write(std::basic_string_view<std::byte> data);
120 void resize(std::int64_t size);
123 [[nodiscard]] std::int64_t tell()
const;
126 std::int64_t seek_abs(std::int64_t offset = 0);
128 std::int64_t seek_rel(std::int64_t offset = 0);
130 std::int64_t seek_end(std::int64_t offset = 0);
137 dbtransaction &tx, std::basic_string_view<std::byte> data, oid
id = 0);
142 static void append_from_buf(
143 dbtransaction &tx, std::basic_string_view<std::byte> data, oid
id);
152 static oid from_file(
dbtransaction &,
char const path[], oid);
160 std::size_t max_size);
169 static std::size_t append_to_buf(
171 std::basic_string<std::byte> &buf, std::size_t append_max);
174 static void to_file(
dbtransaction &, oid,
char const path[]);
188 m_conn{&conn}, m_fd{fd}
190 static PQXX_PRIVATE blob open_internal(dbtransaction &, oid,
int);
191 static PQXX_PRIVATE pqxx::internal::pq::PGconn *
193 static PQXX_PRIVATE pqxx::internal::pq::PGconn *
195 static PQXX_PRIVATE std::string errmsg(connection
const *);
196 static PQXX_PRIVATE std::string errmsg(dbtransaction
const &tx)
198 return errmsg(&tx.conn());
200 PQXX_PRIVATE std::string errmsg()
const {
return errmsg(m_conn); }
201 PQXX_PRIVATE std::int64_t seek(std::int64_t offset,
int whence);
203 connection *m_conn =
nullptr;
The home of all libpqxx classes, functions, templates, etc.
Definition: array.hxx:26
std::vector< std::string_view > to_buf(char *here, char const *end, TYPE... value)
Convert multiple values to strings inside a single buffer.
Definition: strconv.hxx:332
blob(blob const &)=delete
blob()=default
You can default-construct a blob, but it won't do anything useful.
blob & operator=(blob const &)=delete
Connection to a database.
Definition: connection.hxx:170
Abstract transaction base class: bracket transactions on the database.
Definition: dbtransaction.hxx:53