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

Method is_valid_enum_value

src/cache/enum_cache.rs:133–136  ·  view source on GitHub ↗

Validate if a value is valid for an ENUM type (uses cache)

(&self, conn: &Connection, type_oid: i32, label: &str)

Source from the content-addressed store, hash-verified

131
132 /// Validate if a value is valid for an ENUM type (uses cache)
133 pub fn is_valid_enum_value(&self, conn: &Connection, type_oid: i32, label: &str) -> rusqlite::Result<bool> {
134 let values = self.get_enum_values(conn, type_oid)?;
135 Ok(values.iter().any(|v| v.label == label))
136 }
137
138 /// Invalidate cache entries for a specific type
139 pub fn invalidate_type(&self, type_oid: i32) {

Callers

nothing calls this directly

Calls 1

get_enum_valuesMethod · 0.45

Tested by

no test coverage detected