Ejemplo n.º 1
0
 public bool DeleteDictionary(string system)
 {
     return(PostgresTerminology
            .Call("dict.fx_delete_dictionary")
            .WithText(system)
            .Cast <bool>());
 }
Ejemplo n.º 2
0
 public bool CreateDictionary(string dictionaryName, string system)
 {
     return(PostgresTerminology
            .Call("dict.fx_create_dictionary")
            .WithText(dictionaryName)
            .WithText(system)
            .Cast <bool>());
 }
Ejemplo n.º 3
0
 public bool Validate(string system, string code, string version)
 {
     return(PostgresTerminology
            .Call("dict.fx_validate")
            .WithText(system)
            .WithText(code)
            .WithText(version)
            .Cast <bool>());
 }
Ejemplo n.º 4
0
 public long Delete(string system, string code, string version)
 {
     return(PostgresTerminology
            .Call("dict.fx_delete")
            .WithText(system)
            .WithText(code)
            .WithText(version)
            .Cast <long>());
 }
Ejemplo n.º 5
0
        public List <TerminologyDictionaryItem> Search(string system, string filter)
        {
            var dataReader = PostgresTerminology
                             .Call("dict.fx_search")
                             .WithText(system)
                             .WithText(filter ?? string.Empty)
                             .Read();

            return(dataReader);
        }
Ejemplo n.º 6
0
        public TerminologyDictionaryItem Read(string system, string code, string version)
        {
            var json = PostgresTerminology
                       .Call("dict.fx_read")
                       .WithText(system)
                       .WithText(code)
                       .WithText(version)
                       .Read();

            return(json.FirstOrDefault());
        }
Ejemplo n.º 7
0
        public bool Create(string system, string code, string version, string display, Dictionary <string, string> content)
        {
            var jsonContent = JsonConvert.SerializeObject(content);

            return(PostgresTerminology
                   .Call("dict.fx_create")
                   .WithText(system)
                   .WithText(code)
                   .WithText(display)
                   .WithJsonb(jsonContent)
                   .WithText(version)
                   .Cast <bool>());
        }
Ejemplo n.º 8
0
 public bool IsIerarchicalDictionary(string system, out string parentId)
 {
     parentId = PostgresTerminology.GetDictionaryParentId(system);
     return(!string.IsNullOrEmpty(parentId));
 }