Esempio n. 1
0
 public bool DeleteDictionary(string system)
 {
     return(PostgresTerminology
            .Call("dict.fx_delete_dictionary")
            .WithText(system)
            .Cast <bool>());
 }
Esempio n. 2
0
 public bool CreateDictionary(string dictionaryName, string system)
 {
     return(PostgresTerminology
            .Call("dict.fx_create_dictionary")
            .WithText(dictionaryName)
            .WithText(system)
            .Cast <bool>());
 }
Esempio 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>());
 }
Esempio 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>());
 }
Esempio 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);
        }
Esempio 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());
        }
Esempio 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>());
        }
Esempio n. 8
0
 public bool IsIerarchicalDictionary(string system, out string parentId)
 {
     parentId = PostgresTerminology.GetDictionaryParentId(system);
     return(!string.IsNullOrEmpty(parentId));
 }