jeudi 26 février 2015

Validate SQL Query Syntax with Python and SQLite

I am using Python to execute a series of SQLite queries from a .sql file. It seems like there should be a good way to check the syntax of the queries to verify that they are all written correctly and will execute. This is especially important because these queries will for both MySQL and SQLite, so any MySQL-specific syntax should be caught and flagged.


Of course, I could just execute the queries and look for an exception. But it seems like there should be a better way than that.


Aucun commentaire:

Enregistrer un commentaire