Analysis of how enode starts up for an Oracle session

Idea being to plan what needs to be done for mysql/mariadb session
This commit is contained in:
Éibhear Ó hAnluain 2019-05-23 16:54:48 +01:00
parent 01b98343d2
commit 5e3dfd98a8

45
docs/enode.org Normal file
View file

@ -0,0 +1,45 @@
* Processes
** Startup
- =(enode project)=
+ =(enode-available-projects)=
* =(enode-get-projects)=
- =(load-file enode-projects-file)=
* =(enode-project-available project)=
- Test to see if (e.g.) =~/development/<project>/scripts/sql/<project>_ENODE.sql= exists
+ =(setq enode-current-connection-type <connection-type-of-project>)=
+ =(enode-start-engine)=
* =(enode-oracle-start-sql-engine)=
- =(call-interactively 'sql-oracle)=. The command-line option
set for =sqlplus= in the emacs customisation system include
=/nolog=, which leaves the need to connect to a database
until *after* the process has commenced.
- Set SQL buffer settings
+ Open the =*_ENODE.sql= file for the project
+ =(setq enode-up t)= to declare that enode has started.
+ =(enode-connection)= called interactively
* =(enode-get-connections)=
- =(enode-load-connections-list)=
+ =(load-file enode-connections-file)=
* =(enode-get-connections)=. As above.
* =(enode-add-new-connection connection-description)=
- =(enode-load-connections-list)=. As above.
- =(enode-get-connections)=. As above.
- Get attributes:
+ =conn-user=: Username
+ =conn-connection=: Database connection: modelled by Oracle's TNSNames details
+ =conn-prompt=: a three-character designator to use as the SQL*Plus prompt.
- Add these details as a record in the =current-type-connections= list.
- Update =all-connections= with the new =current-type-connections= list.
- Update =enode-connections-file=.
- =(enode-load-connections-list)=. As above.
* =(enode-connect connection-description)=
- =(enode-get-connections)=. As above.
- Access and, maybe, set =enode-passwords-in-use=.
- =(enode-oracle-connect conn-user conn-pass conn-connection conn-prompt)=
+ Issue the commands to the already-created iSQL session:
: connect <conn-user>/<conn-pass>@<conn-connection>
: set serverout on
: set sqlprompt "<conn-prompt>> "
- =(setq enode-currrent-connection connection-description)=
- =(setq enode-connected t)=