MCPcopy Create free account
hub / github.com/f0rr0/oliphaunt / retrieve_row_count

Function retrieve_row_count

src/pglite/parse.rs:121–130  ·  view source on GitHub ↗
(msg: &CommandCompleteMessage)

Source from the content-addressed store, hash-verified

119}
120
121fn retrieve_row_count(msg: &CommandCompleteMessage) -> usize {
122 let parts: Vec<&str> = msg.text.split(' ').collect();
123 match parts.first().copied() {
124 Some("INSERT") => parts.get(2).and_then(|v| v.parse().ok()).unwrap_or(0),
125 Some("UPDATE") | Some("DELETE") | Some("COPY") | Some("MERGE") => {
126 parts.get(1).and_then(|v| v.parse().ok()).unwrap_or(0)
127 }
128 _ => 0,
129 }
130}

Callers 1

parse_resultsFunction · 0.85

Calls 1

parseMethod · 0.45

Tested by

no test coverage detected