MCPcopy Create free account
hub / github.com/erans/pgsqlite / test_pgadmin4_full_query_preprocessing

Function test_pgadmin4_full_query_preprocessing

src/query/executor.rs:2911–2924  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2909
2910 #[test]
2911 fn test_pgadmin4_full_query_preprocessing() {
2912 let query = "SELECT set_config('bytea_output','hex',false) FROM pg_show_all_settings() WHERE name = 'bytea_output'";
2913
2914 let rewritten = preprocess_query(query);
2915 assert_eq!(
2916 rewritten,
2917 "SELECT set_config('bytea_output','hex',false) FROM pg_settings WHERE name = 'bytea_output'"
2918 );
2919
2920 let caps = SET_CONFIG_PATTERN.captures(&rewritten).unwrap();
2921 assert_eq!(&caps[1], "bytea_output");
2922 assert_eq!(&caps[2], "hex");
2923 assert_eq!(&caps[3], "false");
2924 }
2925}

Callers

nothing calls this directly

Calls 1

preprocess_queryFunction · 0.85

Tested by

no test coverage detected