[Geany-devel] Developing database query plugin
Matthew Brush
matthewbrush at xxxxx
Thu Feb 24 13:41:18 UTC 2011
On 02/24/11 05:17, Mike Thorn wrote:
> * What's the best way to make this plugin connect to different
> databases? Right now it's working with postgresql only
I have 0 experience with this, but maybe ODBC is the thing to use?
Google hit: http://www.unixodbc.org/ and there's tons of docs on the
Microsoft side.
> * What's the best way to store the database config? Ideally I'd want
> the option to store the connection information in the project data.
The project file is just a key/ini/config file, so you could probably
write into that, or use your own. I think the plugin API has functions
for working with keyfiles. It's also easy from straight Vala:
http://code.valaide.org/content/example-program-using-keyfile-glib-class-readwrite-ini-files.
I guess you'd need something different if you wanted to save passwords.
Maybe: http://valadoc.org/references/gnome-keyring-1/0.11.5/index.htm at
least for Gnome.
Happy coding,
Matthew Brush (codebrainz)
More information about the Devel
mailing list