sequeler icon indicating copy to clipboard operation
sequeler copied to clipboard

[Request] Add Firebird support

Open btd1337 opened this issue 6 years ago • 17 comments

Is It possible to add firebird sql support in the Sequeler DB?

btd1337 avatar May 18 '18 14:05 btd1337

It mostly depend if the LibGDA supports that type of database and provides specific bindings. I'll investigate and let you know

Alecaddd avatar May 28 '18 03:05 Alecaddd

from GNOME-DB Roadmap

Next versions

Here is a list of features which will at some point integrated into Libgda:

  • allow using Lua scripting to customize some behaviours

  • support for NoSQL databases using virtual connections: one will be able to run SQL on top of these connections

  • support for Firebird

  • support security filtering for each connection (to deny non allowed queries, for example to only authorize queries which SELECT data from some tables and only at some times)

    more features in GdaBrowser (reports, data migration, schema synchronization)

cjfloss avatar May 28 '18 03:05 cjfloss

@cjfloss oh wow, fantastic news, thanks for sharing!

I currently have lots of bugs related to the LibGDA, hopefully the new version will bring fixes and improvements.

Alecaddd avatar May 28 '18 03:05 Alecaddd

I guess it has some support now, but is still in development

https://github.com/GNOME/libgda/tree/master/providers/firebird

cjfloss avatar May 28 '18 03:05 cjfloss

@cjfloss @Alecaddd

https://www.firebirdsql.org/en/newsletter/firebird-sql-project-newsletter-issue-4-17057/#Libgda_5.1.0_released_with_Firebird_support_and_many_improvements

captura de tela de 2018-05-28 13-45-18

btd1337 avatar May 28 '18 16:05 btd1337

This support already exists:

https://www.archlinux.org/packages/extra/x86_64/libgda-firebird/files/

btd1337 avatar May 28 '18 16:05 btd1337

@btd1337 Do you use Firebird?

I'm not an expert and I'm not sure when I'll be able to implement it, but if you want, you can make a PR to implement the support of this type of Database. All the currently available DBs in Sequeler are all in the same folder location src/Services/Types and hooked to the same interface src/Services/Types/DataBaseType.vala, so it should be fairly easy to add a new DB type.

Alecaddd avatar May 28 '18 17:05 Alecaddd

@mdamaceno Can you help?

btd1337 avatar May 28 '18 17:05 btd1337

I don't know if I can help because Fedora, the distro I use, doesn't have lidgda-firebird released. I can't test this feature for now.

mdamaceno avatar May 29 '18 01:05 mdamaceno

@mdamaceno Use this libgda-firebird download

U need just extract this to your /

captura de tela de 2018-05-29 00-19-13

btd1337 avatar May 29 '18 03:05 btd1337

I'm trying to implement this, probably tomorrow I send a PR.

cjfloss avatar May 29 '18 23:05 cjfloss

I'm running into some design problems

  • Firebird also needs a file (like SQLite) so the ConnectionDialog needs to be a bit different
  • It's not possible to use visibility to mannage wich fields are shown, like in this part
var toggle = db_type_entry.get_active () == 3 ? true : false;
toggle_database_info (toggle);
change_sensitivity ();

if (db_type_entry.get_active () == 2) {
	db_port_entry.placeholder_text = "5432";
} else {
	db_port_entry.placeholder_text = "3306";
}

I was thinking in making the class Sequeler.Services.Types.TYPE return a form wich is added to the main form on the ConnectionDialog

cjfloss avatar Jun 02 '18 18:06 cjfloss

Or the user could type the whole path into the database name

the user would type on the database name field /home/user/firebird.fdb or if the server is on windows C:\Data\Folder\firebird.fdb

cjfloss avatar Jun 02 '18 18:06 cjfloss

When I was typing the comment above I realised the it's a better implementation, since it works for unix and windows.

cjfloss avatar Jun 02 '18 18:06 cjfloss

@cjfloss Interesting design problem. If this is a roadblock for you, you can simply return an open input field to allow the user to manually specify the file Path. Not the best usable solution, but acceptable for now.

Later, I will take a look at the problem and define a more modular way to handle the connection form.

Alecaddd avatar Jun 02 '18 21:06 Alecaddd

In Firebird, the path of the database is a part of its name. So, I think the ConnectionDialog could be like MySQL or PostgreSQL. If you need to specify a file (like SQLite), you may have problems when you run Firebird on Docker.

mdamaceno avatar Jun 09 '18 21:06 mdamaceno

I'm also very interested in this feature. Has there been any progress or plans to release this?

aspersieman avatar Jul 21 '21 10:07 aspersieman