Skip to content

pbh/hey_pgsqlexec

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

hey_pgsqlexec

A simple executable object for dumping SQL from files into a PostgreSQL database through psycopg2.

-------PGSQLExec is a simple interface for dumping SQL into a PostgreSQL database, often from a file, and maybe getting some results out.

The usage is usually something like:

(hey_pgsqlexec.PGSQLExec(self.conn)
 .append_file('txt/check_append.sql', localizer=self._dl)
 .execute()
 .get_rows()[0][0])

Essentially, PGSQLExec is a minimal, chaining wrapper around the psycopg2 Connection and Cursor classes to make the common case of working with pre-written, static SQL files easier.

About

Hey! PostgreSQL SQL Executable Object

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published