nodedb-client 0.6.2

Unified NodeDb trait and remote client for NodeDB Origin and Lite
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// SPDX-License-Identifier: Apache-2.0

//! Client-compatible alias for the shared SQL identifier quoting chokepoint.

pub(crate) use nodedb_types::quote_ident as quote_identifier;

#[cfg(test)]
mod tests {
    use super::*;

    #[test]
    fn wraps_and_escapes_double_quotes() {
        assert_eq!(quote_identifier("foo"), "\"foo\"");
        // Embedded `"` must be doubled per the SQL identifier-escape rule.
        assert_eq!(quote_identifier("a\"b"), "\"a\"\"b\"");
    }
}