You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+50-3Lines changed: 50 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,6 +17,18 @@ After you have Ash installed, run either one of these two commands depending on
17
17
18
18
You can optionally install this globally by adding `--global` to the end of the command.
19
19
20
+
## Dependencies
21
+
22
+
The external dependencies for this module you likely already have:
23
+
24
+
#### MySQL Driver
25
+
26
+
For the MySQL driver, the [MySQL Command Line Tool](http://dev.mysql.com/doc/refman/5.7/en/mysql.html) is required.
27
+
28
+
#### PostgreSQL Driver
29
+
30
+
For the PostgreSQL driver, [psql](https://www.postgresql.org/docs/9.1/static/app-psql.html) is required.
31
+
20
32
## Environment Variables
21
33
22
34
Before jumping into using this library, you're going to have to set some environment variables so SQL knows how to connect to your database.
@@ -28,30 +40,65 @@ I would recommend creating a `.env` file and sourcing it into your project.
28
40
Here is a list of all of the configurable values, if you plan on using the PostgreSQL driver. The values that I have set below are the defaults (so if your needs match the defaults, feel free to exclude them).
29
41
30
42
```sh
43
+
# The location of your psql command. If psql is already in
44
+
# your $PATH (which it probably is), no need to edit this value.
45
+
# In the event this isn't already in your path, I recommend putting
46
+
# this value into your ~/.ashrc file.
31
47
SQL_POSTGRES_PATH='psql'
48
+
49
+
# The PostgreSQL user you will connect with.
50
+
# Note there is no password environment variable:
51
+
# you must use the ~/.pgpass file.
32
52
SQL_POSTGRES_USER='postgres'
53
+
54
+
# The host of your database.
33
55
SQL_POSTGRES_HOST='localhost'
56
+
57
+
# The port of your database.
34
58
SQL_POSTGRES_PORT='5432'
59
+
60
+
# The name of your database.
35
61
SQL_POSTGRES_DATABASE_NAME=''
36
62
```
37
63
38
-
You must use a [pgpass file](https://www.postgresql.org/docs/9.3/static/libpq-pgpass.html) for the PostgreSQL driver.
64
+
> You must use a [pgpass file](https://www.postgresql.org/docs/9.3/static/libpq-pgpass.html) for the PostgreSQL driver.
39
65
40
66
### MySQL
41
67
42
68
Here is a list of all of the configurable values, if you plan on using the MySQL driver. The values that I have set below are the defaults (so if your needs match the defaults, feel free to exclude them).
43
69
44
70
```sh
71
+
# The location of your mysql command. If mysql is already in
72
+
# your $PATH (which it probably is), no need to edit this value.
73
+
# In the event this isn't already in your path, I recommend putting
74
+
# this value into your ~/.ashrc file.
45
75
SQL_MYSQL_PATH='mysql'
76
+
77
+
# The MySQL user you will connect with.
46
78
SQL_MYSQL_USER='root'
79
+
80
+
# The MySQL users password you will connect with.
81
+
SQL_MYSQL_PASSWORD=''
82
+
83
+
# The host of your database.
47
84
SQL_MYSQL_HOST='localhost'
85
+
86
+
# The port of your database.
48
87
SQL_MYSQL_PORT='3306'
88
+
89
+
# The name of your database.
49
90
SQL_MYSQL_DATABASE_NAME=''
50
-
SQL_MYSQL_PASSWORD=''
91
+
92
+
# The location where this library will temporarily create a
You must have write access to `SQL_MYSQL_CONFIG_FILE`s directory. You most likely won't ever have to change that (so just exclude it), but I've added it as configurable in the event you are on an operating system without a `/tmp` directory.
101
+
> You must have write access to `SQL_MYSQL_CONFIG_FILE`s directory. You most likely won't ever have to change that (so just exclude it), but I've added it as configurable in the event you are on an operating system without a `/tmp` directory.
0 commit comments