Skip to content

Refactor/module layout 2018#79

Open
seuros wants to merge 3 commits into
memgraph:masterfrom
seuros:refactor/module-layout-2018
Open

Refactor/module layout 2018#79
seuros wants to merge 3 commits into
memgraph:masterfrom
seuros:refactor/module-layout-2018

Conversation

@seuros

@seuros seuros commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

ping @antejavor

Just structure hygiene i had locally, nothing was changed here.

@seuros seuros requested review from antejavor and gitbuda as code owners June 22, 2026 12:55

@antejavor antejavor left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm I thought this would be just a structure change, but there are two things I am noticing.

  1. Introduced envs
  2. Changing the param type

Will take a deeper look into this tomorrow and push it over the line.

Comment thread src/connection/tests.rs

fn execute_query_and_fetchall(query: &str) -> Vec<Record> {
let connect_prms = ConnectParams {
address: Some(String::from("127.0.0.1")),

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We are changing the address to a host here. Looks ok, probably string vs numeric value. CI does not complain.

Comment thread src/connection/tests.rs
/// (host/port default to `127.0.0.1:7687`, credentials unset).
fn test_params() -> ConnectParams {
ConnectParams {
host: Some(std::env::var("MGHOST").unwrap_or_else(|_| "127.0.0.1".to_string())),

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We are introducing envs here. 🤔 We should probably used some more standard names for this, will link it.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Envs are introduced in tests only.

That allows me to run it again a remote mg instance.

The whole PR is just mechanical changes, i will open another change once this lands.

seuros added 3 commits June 24, 2026 18:14
- connection: extract query_error/fail_query, settled_status, release_connection,
  optional_cstring, and fetch_records helpers; collapse repeated error/status
  handling and merge identical fetchone tail arms
- value: add value_or_null + wrap_or_null! to dedup QueryParam conversion, and
  drop redundant no-op null guards in the *_to_mg_* converters
- fix clippy: collapsible_match/if, while-let loop, .first(), is_some_and,
  size_of_val, OpenOptions::truncate
…PASSWORD

Defaults preserved (127.0.0.1/localhost:7687, no credentials) so existing
behavior is unchanged; lets the suite target an authenticated instance.
@seuros seuros force-pushed the refactor/module-layout-2018 branch from a61aa6c to c7a26b5 Compare June 24, 2026 17:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants