summaryrefslogtreecommitdiff
path: root/subprojects/boost-sqlite/doc/reference/row.adoc
diff options
context:
space:
mode:
authorJohn Turner <jturner.usa@gmail.com>2025-09-14 00:16:10 -0400
committerJohn Turner <jturner.usa@gmail.com>2025-09-14 00:16:10 -0400
commit13e0821fd783a1d5083d825af53cf20e8dcbfd76 (patch)
tree1ea363b0f13b3e87d177100e6ae6b9f30a2de1b8 /subprojects/boost-sqlite/doc/reference/row.adoc
parentaa55cb93036a89c64c08e08f4e1de4fa1fd5a775 (diff)
parentefcea3a80da7c4479d5fe168435ecc9fd06bdc72 (diff)
downloadsqlite-kv-bench-13e0821fd783a1d5083d825af53cf20e8dcbfd76.tar.gz
Merge commit 'efcea3a80da7c4479d5fe168435ecc9fd06bdc72' as 'subprojects/boost-sqlite'
Diffstat (limited to 'subprojects/boost-sqlite/doc/reference/row.adoc')
-rw-r--r--subprojects/boost-sqlite/doc/reference/row.adoc56
1 files changed, 56 insertions, 0 deletions
diff --git a/subprojects/boost-sqlite/doc/reference/row.adoc b/subprojects/boost-sqlite/doc/reference/row.adoc
new file mode 100644
index 0000000..d3af982
--- /dev/null
+++ b/subprojects/boost-sqlite/doc/reference/row.adoc
@@ -0,0 +1,56 @@
+== `sqlite/row.hpp`
+
+This type represents one row of data from a query. Is a random-access range.
+
+WARNING: This type is a pure view type, and will be invalidated when the next row is read.
+
+
+
+[source,cpp]
+----
+
+struct row
+{
+ // The size of the row, i.e. number of colums
+ std::size_t size() const;
+
+ // Returns the field at `idx`, @throws std::out_of_range
+ field at(std::size_t idx) const;
+ // Returns the field at `idx`.
+ field operator[](std::size_t idx) const;
+
+ // Random access iterator used to iterate over the columns.
+ struct const_iterator
+ {
+ using difference_type = int;
+ using reference = field&;
+ using iterator_category = std::random_access_iterator_tag;
+
+ const_iterator & operator++();
+ const_iterator operator++(int);
+ const_iterator & operator--();
+ const_iterator operator--(int);
+
+ field operator[](int i) const;
+
+ const_iterator operator+(int i) const;
+ const_iterator operator-(int i) const;
+ const_iterator & operator+=(int i);
+ const_iterator & operator-=(int i);
+ const field & operator*() const;
+ const field * operator->() const;
+
+ bool operator==(const const_iterator& other) const;
+ bool operator!=(const const_iterator& other) const;
+ bool operator<(const const_iterator& other) const;
+ bool operator>(const const_iterator& other) const;
+
+ const_iterator() = default;
+ };
+ // Returns the begin of the column-range.
+ const_iterator begin() const;
+
+ // Returns the end of the column-range.
+ const_iterator end() const
+};
+----