Query database from my Go source code #3308
                  
                    
                      jerome-diver
                    
                  
                
                  started this conversation in
                General
              
            Replies: 1 comment 6 replies
-
| 
         Upstream rpm provides a C API and Python bindings, that's how you access the rpmdb and anything else in rpm. 3rd party bindings exist for at least Perl and Rust. No idea about Go, but you could always roll your own. https://github.com/rpm-software-management/rpm/tree/master/python/examples has some examples for querying, it's of course Python but gives you an idea what the rpmdb query API looks like.  | 
  
Beta Was this translation helpful? Give feedback.
                  
                    6 replies
                  
                
            
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment
  
        
    
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi @pmatilai (or any other maintainer that want to talk about that), i want to create a general kind of package viewer (not to install anything, but just show) than can embed a lot of other packages managers (not only the one for ditro, but also for snap and flatpak containers, and language specific packages/modules managers). And iḿ doing this in Go.
Query from my own code
I don´t want to do something dirty like to exec some shell command from my own code. Instead, i read files generated by managers and/or databases (for dnf, it is easy).
So there is 2 (or maybe more) options:
I want to show
Question
Beta Was this translation helpful? Give feedback.
All reactions