Mercurial > sqlpython
changeset 201:6e69f866b702
tests for \dv
author | catherine@dellzilla |
---|---|
date | Thu, 04 Dec 2008 17:24:59 -0500 |
parents | 54cd1e802fa0 |
children | 3ca2271847e2 |
files | sqlpython/exampleSession.txt sqlpython/mysqlpy.py |
diffstat | 2 files changed, 46 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/sqlpython/exampleSession.txt Thu Dec 04 16:43:42 2008 -0500 +++ b/sqlpython/exampleSession.txt Thu Dec 04 17:24:59 2008 -0500 @@ -259,6 +259,52 @@ 2 rows selected. +testschema@orcl> -- \d command inspired by postgresql's psql +testschema@orcl> \dt + +TABLE_NAME TYPE +---------- ----- +PLAY TABLE + +1 row selected. + +testschema@orcl> \di + +INDEX_NAME INDEX_TYPE +---------- ---------- +XPK_PLAY NORMAL + +1 row selected. + +testschema@orcl> CREATE OR REPLACE VIEW review +> AS +> SELECT title, author, 'A masterpiece!' review +> FROM play; + +Executed + +testschema@orcl> \dv + +VIEW_NAME TYPE +--------- ---- +REVIEW VIEW + +1 row selected. + +testschema@orcl> cat review + +TITLE AUTHOR REVIEW +------------- ----------- -------------- +Twelfth Night Shakespeare A masterpiece! +The Tempest Shakespeare A masterpiece! +Agamemnon Aeschylus A masterpiece! + +3 rows selected. + +testschema@orcl> drop view review; + +Executed + testschema@orcl> drop table play; Executed
--- a/sqlpython/mysqlpy.py Thu Dec 04 16:43:42 2008 -0500 +++ b/sqlpython/mysqlpy.py Thu Dec 04 17:24:59 2008 -0500 @@ -106,10 +106,6 @@ which get and run SQL scripts from disk.''' self.do_select(self.query_load10g) - def do_himom(self,args): - '''greets your mom''' - print 'hi mom' - def do_db(self,args,filepath='pass.txt'): '''Exec do_connect to db_alias in args (credentials form the file pass.txt) ''' f = open(filepath,'r')