Tadpole - for SQLite

Figured out how to get the NOE, it’s definitely sandbox related. You don’t have access to files in the sandbox unless you’ve requested access from the user with an OpenDialog. So your recent files list will not work on subsequent launches unless the DB is in the Downloads folder, since you’ve set your entitlements for that (which, as I said, you shouldn’t)

Sam can help with security-bodged-bookmarks, but they’re such a headache.

I think Jürg did nail it…
Turns out the SAKILA database example was set to JOURNAL MODE = WAL
where JOURNAL MODE = DELETE is the default (and the mode is all the other tests I ran)

Tim… I don’t understand your comment about the app icon?

Dave

I use:

dim jMode As String dim rs As Recordset = db.SQLSelect("pragma journal_mode") jMode = rs.Field("journal_mode").StringValue db.SQLExecute("pragma journal_mode = delete")
when I open a database or create a new one.

When I close the database:

db.SQLExecute("pragma journal_mode = " + jMode)

I know this is teaching Grandma to suck eggs but it seems to work for me!

Well that’ll screw with a database’s Last Modified date if you do that and the user doesn’t make any changes.
Not acceptable for a consumer-facing general database editor.

[quote=336154:@Tim Parnell]Well that’ll screw with a database’s Last Modified date if you do that and the user doesn’t make any changes.
Not acceptable for a consumer-facing general database editor.[/quote]
Oops!

I accept that statement fully. However, if you are using a database editor on a database then wouldn’t you expect the last modified date to be changed anyway?

I understand the auditing logic of what you are saying, Tim, and it makes perfect sense. But, surely, if it were truly that much of an issue you wouldn’t allow any direct editing of a database.

Sometimes while working with databases I just want to view the data quickly. I don’t always want or need to edit.

I could lock the database file at the system level, but that’s going out of my way to use a tool that’s doing writes when it’s not told to by the user.

Let’s keep this thread on Tadpole, if you have any questions or need advice I’m happy to chat privately.

[quote=336150:@Simon Berridge]Dave

I use:

dim jMode As String dim rs As Recordset = db.SQLSelect("pragma journal_mode") jMode = rs.Field("journal_mode").StringValue db.SQLExecute("pragma journal_mode = delete")
when I open a database or create a new one.

When I close the database:

db.SQLExecute("pragma journal_mode = " + jMode)

I know this is teaching Grandma to suck eggs but it seems to work for me![/quote]

what is the purpose of using the pragma journal_mode??

The journal mode controls how ROLLBACK is handled…
the default is “DELETE” …
the Sakila database has WAL as the default… which requires two files to be written while the database is open
These files are what SANDBOX does not like.

PRAGMA is the command to alter the mode

Btw, Mac OS does a decent job of logging all sandbox related issues to the console. A good way to test is to create a new user on your Mac, download and start your software and keep an eye on the console if you encounter any trouble.

I guess for now TadPole will have to be non-sandboxed (and therefore not in the Apple Store)…
I have had some feedback related mostly toward speed issues with results from user entered queries, and I’m working on these now :slight_smile:

A new release of Tadpole is available

macOS version : www.rdS.com/tadpole/tadpole4macos.zip this version is NOT SIGNED or AppWrapped
Windows10 : www.rdS.com/tadpole/tadpole4win.zip NOTE : this does NOT include an installer (yet)

for now I am not using AppWrap on the macOS version, until I get all the issues worked out of the app itself. Seems Sandboxing creates a whole new set of headaches… (yes I know I can AppWrap without Sandbox… and will go that route later)

This version fixes a few bugs that were reported to me. including speeding up return results from large queries entered in the SQL Editor (by up to 6x in tests)
It also adds a “FILTER” dialog for tables viewed using the Tree Navigator (dbl click on a table name)

Another new release of Tadpole is available

macOS version : www.rdS.com/tadpole/tadpole4macos.zip this version is NOT SIGNED or AppWrapped
Windows10 : www.rdS.com/tadpole/tadpole4win.zip NOTE : this does NOT include an installer (yet)

[code]18Jun2017

  • for some reason CANCEL button on Attach DB window was disabled… fixed
  • added Msgbox to error msg in Attach DB, in case main window is partial covered
  • handles most cases of “ambigious” field names

17Jun2017

  • changed SCRIPT menu back to FILE
  • when adding a new field in CREATE TABLE wizard, it highlights FIELDNAME automatically

16Jun2017

  • reengineered SQLEditor Results Grid to use threads, sped up 100K record read by 6x
  • added Filter dialog to Navigator Results Grid[/code]

future “To Do”

  • Foreign Key Support
  • Complete fully functional Alter Table Wizard (add column only works now) [this relies on FK support being completed]
  • Visual SQL Builder of some type
  • Database Visualizer (maybe)… this too will rely on FK support, otherwise not much to visualize :slight_smile:

BTW: I also use AppWrapper to codesign, without sandboxing an app.

When I sandbox a database app, then I import sqlite databases into the container before using them (if the user agrees).

Due to the tremendous feedback I have been getting (thanks all)
I have been adding some minor features to Tadpole, but am also undergoing a major re-engineering effort to better utilize the SQL tokenizer to allow Tadpole to support FOREIGN KEYS …

As a result, the next Beta release will probably be a number of days from now… but in the meantime, anyone that is playing with Tadpole, I would still like any and all feedback, comments, suggestions etc…

here is the first “real” diagram made with Tadpole. This feature still has some work to go, but its getting there.

whats it do with compound primary keys ?
I dont see any in that schema (and I’d really rather not in most schema’s but you know someone will have them)

[quote=337815:@Norman Palardy]whats it do with compound primary keys ?
I dont see any in that schema (and I’d really rather not in most schema’s but you know someone will have them)[/quote]

you mean

PRIMARY KEY(column1,column2)

GOOD Question… what would you like to see it (or any other app) do?

In regards to this diagramming… the question would be more related to Compound FOREIGN keys, as they are the ones that define the links between tables.

compound keys of all kinds

you really can try & highlight them with an icon as order for the key might be important

almost need a section that shows compound keys for the table below the list of columns (and maybe indexes too with their definitions)

The diagram above is just a “Tool” window in Tadpole, the main window where all the actual database manipulation takes places provides access to all that information… All the tables, views, indexes, triggers … etc.

I’d still want to see them (or have an optional way of showing them)
An ERD thats incomplete isn’t terribly useful esp on a really big schema

Yeah i still print this sort of thing out :slight_smile:
MediaWiki’s is decently large one