Database Studios Some Criticism

Many of database studios like MySQL Workbench, Devart dbForge Studio for MySQL and  JetBrains DataGrip provides very strange and limited support of SQL files. The only thing you can do with SQL file is run it and see some results, most often limited number of rows.

But it is very strange functionality.

If SQL query returns million of rows, there is no sense to show 1000 of them. If SQL query modifies some table, there is no sence to keep it opened.

From my experience, SQL queries are always parts of some manual or automated procedures, i.e. organized in sequences or trees. So, I would like is SQL studio software provide some sort of “schema” or any other type of organization chart for SQL files.

It can be something like this:

example-of-sql-dependencies

(drawn in EA)

BTW, dbForge has very nice “dependency” feature for server side objects:

dbforge-dependency-feature

Would like something close to development-machine-sided SQL files.

Turning ImageButton to toggled one

Was trying to make ImageButton s “toglable”. Recipes are everywhere and I made such program: https://github.com/dims12/TryInvestigateButtonUnpress

It shows “pressed” button by

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);

    ButterKnife.bind(this);

    someButton.setSelected(true);
}

And looks the following way:

xboofaf

Unfortunately, once I press “Home” button on the device, button turns unpressed. This happens even before application actually minimizes.

The solution for this appeared simple: I was to simulated toggle not with “pressed”, but with “selected” attribute.