Skip to content

Commit 7e8e531

Browse files
committed
Find Application Directory for Dado and Link
1 parent 38348c4 commit 7e8e531

File tree

6 files changed

+32
-13
lines changed

6 files changed

+32
-13
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@ aplcore
22
.acre/
33
dist/
44
Assets/Runtime/LocallyDerived/
5+
config.json

APLSource/Config/DropEnding.aplf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
DropEnding←{
2+
⍝ Drop ⍺ from ⍵ if ⍵ ends in ⍺
3+
n←-≢⍺
4+
b←⍺≡n↑⍵
5+
(b×n)↓⍵
6+
}

APLSource/Config/FindLinkedDir.aplf

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,5 @@
33
⍝ ← ←→ Linked directory. Empty string if not found
44
l←⎕SE.Link.List''
55
2≠⍴⍴l:''
6-
c←(,1↑l)⍳⊂'Directory'
7-
d←1↓l[;c]
8-
i←((-≢⍵)↑¨d)⍳⊂⍵
9-
i⊃d,⊂''
6+
⊃l[⍸+/⍵∘⍷↑l]
107
}

APLSource/Config/GetAppDir.aplf

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
GetAppDir←{
2-
⍝ TODO: Figure out how if this will work with DADO
32
isWorkspace←'CLEAR WS'≢⎕WSID
43
isWorkspace:WorkspaceDirectory''
5-
isAcre←0≠⎕NC'#.AcreConfig'
6-
isAcre:#.AcreConfig.ProjectFolder
7-
r←FindLinkedDir ##.AppName''
4+
isDado←0≠⎕NC'##.AcreConfig'
5+
isDado:##.AcreConfig.ProjectFolder
6+
r←'/APLSource'DropEnding FindLinkedDir ##.AppName''
87
r≢'':r
98
msg←'Unable to find directory where the app config file should reside.'
109
msg,←' Please enter a valid folder location:'
11-
##.GUI.TextPrompt⊂msg
10+
##.GUI.TextPrompt⊂msg
1211
}

APLSource/Version.aplf

Lines changed: 0 additions & 4 deletions
This file was deleted.

README.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# SQL Browser
2+
Simple database browser for ODBC compliant databases. Currently designed for Windows, but a cross platform app could be released in future versions.
3+
4+
Dyalog APL comes with a powerful SQL interface. New users who don't want to read the docs to get it working, or older users who are tired of trying to remember table/column names will find this tool useful. Get your work done quick with the assistance of this browser, and let it take care of securely handling your database credentials.
5+
6+
This library requires EasyGUI as a dependency. If you use Dado, or some other package manager, it will fetch EasyGUI for you. Otherwise, you must load the EasyGUI namespace yourself as a sibling namespace to DBViewer.
7+
8+
If you use Dado:
9+
`]Dado.openproject C:\Git\SQL-Browser`
10+
11+
If you use Link:
12+
`]link.create #.DBViewer C:\Git\SQL-Browser\APLSource`
13+
`]link.create #.EasyGUI C:\Git\EasyGUI\APLSource`
14+
15+
Then just Run the application:
16+
`DBViewer.Run`
17+
18+
Tested with PostgreSQL, Oracle, and SQL-Server.
19+
20+
Currently in Beta. Feel free to download and play around with it, but an official release may not be backwards-compatible with Beta versions.

0 commit comments

Comments
 (0)