Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added mgp_list_reserve and List::Reserve #1126

Open
wants to merge 1 commit into
base: memgraph-3-1
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions pages/custom-query-modules/c/c-api.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ Memgraph in order to use them.
| enum [mgp_error](#variable-mgp-error) | **[mgp_list_contains_deleted](#function-mgp-list-contains-deleted)**(struct mgp_list * list, int * result)<br />Result is non-zero if the given list contains any deleted values, otherwise 0. |
| enum [mgp_error](#variable-mgp-error) | **[mgp_list_append](#function-mgp-list-append)**(struct mgp_list * list, struct mgp_value * val)<br />Append a copy of mgp_value to mgp_list if capacity allows. |
| enum [mgp_error](#variable-mgp-error) | **[mgp_list_append_extend](#function-mgp-list-append-extend)**(struct mgp_list * list, struct mgp_value * val)<br />Append a copy of mgp_value to mgp_list increasing capacity if needed. |
| enum [mgp_error](#variable-mgp-error) | **[mgp_list_reserve](#function-mgp-list-reserve)**(struct mgp_list * list, size_t n)<br />Ensure the underlying capacity of the mgp_list is at least n. |
| enum [mgp_error](#variable-mgp-error) | **[mgp_list_size](#function-mgp-list-size)**(struct mgp_list * list, size_t * result)<br />Get the number of elements stored in mgp_list. |
| enum [mgp_error](#variable-mgp-error) | **[mgp_list_capacity](#function-mgp-list-capacity)**(struct mgp_list * list, size_t * result)<br />Get the total number of elements for which there's already allocated memory in mgp_list. |
| enum [mgp_error](#variable-mgp-error) | **[mgp_list_at](#function-mgp-list-at)**(struct mgp_list * list, size_t index, struct mgp_value ** result)<br />Get the element in mgp_list at given position. |
Expand Down
1 change: 1 addition & 0 deletions pages/custom-query-modules/cpp/cpp-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -1786,6 +1786,7 @@ List(List &&other) noexcept
| `Empty` | Returns whether the list is empty. |
| `Append` | Appends the given `value` to the list. |
| `AppendExtend` | Extends the list and appends the given `value` to it. |
| `Reserve` | Ensure underlying capacity is at least `n`. |
| `begin`<br/>`end`<br/>`cbegin`<br/>`cend` | Returns the beginning/end of the `List` iterator. |
| `ToString` | Returns the list's string representation. |

Expand Down