You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+4-2Lines changed: 4 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -94,6 +94,7 @@ These are the primary entry points most users will interact with:
94
94
*[`SqlDocBuilder::build`](https://docs.rs/sql-docs/latest/sql_docs/sql_doc/struct.SqlDocBuilder.html#method.build) Finalize the builder and produce a [`SqlDoc`].
95
95
*[`SqlDocBuilder::deny`](https://docs.rs/sql-docs/latest/sql_docs/sql_doc/struct.SqlDocBuilder.html#method.deny) Exclude specific files by full path.
96
96
*[`SqlDocBuilder::flatten_multiline`](https://docs.rs/sql-docs/latest/sql_docs/sql_doc/struct.SqlDocBuilder.html#method.flatten_multiline) Flatten multiline comments into a single line.
97
+
*[`SqlDocBuilder::collect_single_nearest`](https://docs.rs/sql-docs/latest/sql_docs/sql_doc/struct.SqlDocBuilder.html#method.collect_single_nearest) Collect only the nearest leading comment.
97
98
98
99
## Use Cases
99
100
@@ -102,7 +103,7 @@ This crate is designed for generating documentation from SQL schemas by attachin
102
103
* Tables
103
104
* Columns
104
105
105
-
using **only comments that immediately precede** the items they describe.
106
+
using **only comments that immediately precede** the items they describe, with the ability to differentiate between multiple leading comments per statement or collect only the nearest comment preceding a statement.
106
107
107
108
This makes it well-suited for:
108
109
@@ -116,4 +117,5 @@ This makes it well-suited for:
116
117
* Inline and interstitial comments are intentionally ignored.
117
118
* Comment attachment is line-based and deterministic.
118
119
* One SQL file may define multiple tables.
119
-
* No database connection is required.
120
+
* No database connection is required.
121
+
*`sql_doc` items are sorted by `table` name and `column` name, supporting binary searching
0 commit comments