Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
.flatpak-builder
builddir
build
export
*~
/subprojects/blueprint-compiler
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@

Small tool for quick sql query, specialized in PostgresSQL. Written in Vala for GNOME desktop in the hope to be useful.

> **This project is not a part of or affiliated with PostgreSQL.**

# Features
- Load and save connections.
- List schema info, tables, views.
Expand Down Expand Up @@ -73,3 +75,9 @@ Contributions are welcome.
# FAQ
Why not flathub?
> There is an bug in flatpak-builder build and i don't know why yet (see [#43](https://github.com/ppvan/psequel/issues/43)). So i have to build it in GNOME Builder and upload flatpak file manually in [Releases](https://github.com/ppvan/psequel/releases) tab.


# Credits

- [Psequel](https://psequel.com/) - MacOS postgresql client. This project is inspired by Psequel.
- [libpg_query](https://github.com/pganalyze/libpg_query) - PostgresSQL parser
55 changes: 6 additions & 49 deletions data/icons/hicolor/scalable/apps/me.ppvan.psequel.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions data/me.ppvan.psequel.appdata.xml.in
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
<li>View tables, scshema, views, columns, indexes, foreign key</li>
<li>Execute query, query history</li>
</ul>

<p>This project is not a part of or affiliated with PostgreSQL.</p>
</description>
<provides>
<binary>psequel</binary>
Expand Down
6 changes: 6 additions & 0 deletions me.ppvan.psequel-debug.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,12 @@
},
{
"name": "postgresql-libs",
"buildsystem": "simple",
"build-commands": [
"./configure --prefix=/app --with-ssl=openssl",
Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should be able to work with SSH now

"make -C src/include install",
"make -C src/interfaces/libpq install"
],
"sources": [
{
"type": "archive",
Expand Down
8 changes: 7 additions & 1 deletion me.ppvan.psequel.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
{
"type": "git",
"url": "https://github.com/ppvan/psequel",
"commit": "0e221b0ca0c10b367a5f2b256db76bf2c15b0c04"
"commit": "33a0704cbbc7ab7ef8483404a4578319c001b1f9"
}
],
"modules": [
Expand All @@ -58,6 +58,12 @@
},
{
"name": "postgresql-libs",
"buildsystem": "simple",
"build-commands": [
"./configure --prefix=/app --with-ssl=openssl",
"make -C src/include install",
"make -C src/interfaces/libpq install"
],
"sources": [
{
"type": "archive",
Expand Down
7 changes: 5 additions & 2 deletions src/ui/schema/QueryResult.vala
Original file line number Diff line number Diff line change
Expand Up @@ -99,14 +99,17 @@ namespace Psequel {
var factory = new Gtk.SignalListItemFactory ();
factory.set_data<int> ("index", i);

factory.setup.connect ((_fact, _item) => {
factory.setup.connect ((_fact, obj) => {

var _item = (Gtk.ListItem) obj;
var label = new Gtk.Label (null);
label.halign = Gtk.Align.START;
label.margin_start = 8;
_item.child = label;
});

factory.bind.connect ((_fact, _item) => {
factory.bind.connect ((_fact, obj) => {
var _item = (Gtk.ListItem) obj;
var row = _item.item as Relation.Row;
var label = _item.child as Gtk.Label;
int index = _fact.get_data<int> ("index");
Expand Down
25 changes: 17 additions & 8 deletions src/ui/schema/TableColumnInfo.vala
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,15 @@ namespace Psequel {

private void setup_name_col () {
var factory = new Gtk.SignalListItemFactory ();
factory.setup.connect ((listitem) => {
factory.setup.connect ((obj) => {
var listitem = obj as Gtk.ListItem;

var label = new Gtk.Label (null);
label.halign = Gtk.Align.START;
listitem.child = label;
});
factory.bind.connect ((listitem) => {
factory.bind.connect ((obj) => {
var listitem = obj as Gtk.ListItem;
var item = listitem.item as Column;
var label = listitem.child as Gtk.Label;
label.label = item.name;
Expand All @@ -39,13 +42,15 @@ namespace Psequel {

private void setup_datatype_col () {
var factory = new Gtk.SignalListItemFactory ();
factory.setup.connect ((listitem) => {
factory.setup.connect ((obj) => {
var listitem = obj as Gtk.ListItem;
var label = new Gtk.Label (null);
label.halign = Gtk.Align.START;

listitem.child = label;
});
factory.bind.connect ((listitem) => {
factory.bind.connect ((obj) => {
var listitem = obj as Gtk.ListItem;
var item = listitem.item as Column;
var label = listitem.child as Gtk.Label;
label.label = item.column_type;
Expand All @@ -57,11 +62,13 @@ namespace Psequel {

private void setup_nullable_col () {
var factory = new Gtk.SignalListItemFactory ();
factory.setup.connect ((listitem) => {
factory.setup.connect ((obj) => {
var listitem = obj as Gtk.ListItem;
var label = new Gtk.Label (null);
listitem.child = label;
});
factory.bind.connect ((listitem) => {
factory.bind.connect ((obj) => {
var listitem = obj as Gtk.ListItem;
var item = listitem.item as Column;
var label = listitem.child as Gtk.Label;
label.label = item.nullable ? "YES" : "NO";
Expand All @@ -74,14 +81,16 @@ namespace Psequel {

private void setup_default_col () {
var factory = new Gtk.SignalListItemFactory ();
factory.setup.connect ((listitem) => {
factory.setup.connect ((obj) => {
var listitem = obj as Gtk.ListItem;
var label = new Gtk.Label (null);
label.halign = Gtk.Align.END;
label.margin_end = 4;
label.margin_start = 4;
listitem.child = label;
});
factory.bind.connect ((listitem) => {
factory.bind.connect ((obj) => {
var listitem = obj as Gtk.ListItem;
var item = listitem.item as Column;
var label = listitem.child as Gtk.Label;
label.label = item.default_val;
Expand Down
Loading