Skip to main content

parse_sqlquery_library

Function parse_sqlquery_library 

Source
pub fn parse_sqlquery_library(
    library_json: &Value,
) -> Result<SqlQueryLibrary, SqlQueryError>
Expand description

Parses a Library resource JSON into a SqlQueryLibrary.

Enforces the SQLQuery profile constraints:

  • resourceType == "Library"
  • Library.type.coding[*] contains {system: LibraryTypesCodes, code: sql-query}
  • At least one content attachment with contentType starting with application/sql
  • All relatedArtifact[type="depends-on"] entries have a canonical URL resource and a label matching ^[A-Za-z][A-Za-z0-9_]*$
  • All Library.parameter[use="in"] entries declare a type