Age | Commit message (Collapse) | Author |
|
Update our class names to reflect the new file structure introduced in
b700c1bef89a67a64f1040fb6bb03c0320eefe91.
Use the
module DBShell
module Client
end
end
syntax intead of `DBShell::Client` so that we don't have to define the
`Client` module in a separate file and require it. Otherwise we'd get an
error:
lib/dbshell/client/sqlite3.rb:1:in `<top (required)>': uninitialized constant DBShell::Client (NameError)
|
|
Change the paths in the code to conform to the new file layout
introduced in b700c1bef89a67a64f1040fb6bb03c0320eefe91.
|
|
Will be modifying the class names in the next commit. Here we change the
file names & locations of the database client files.
The format changes thusly:
<adapter>_client.rb -> client/<adapter>.rb
This organisation feels cleaner to me. Wasn't liking the previous
structure.
|
|
A more generic interface to specific database adapter clients. This
class will act as a frontend to the others.
Calling its `.runshell()` will call the appropriate `.runshell()` for
the adapter provided in `connection_params`.
This way, we have a single entry point to start a database shell from
the Rake `dbshell` task.
|
|
Much simpler `.build_command` than the Postgres version. Only building
arguments now. Want to try out executing the subprocess command.
Inspired of course by:
https://github.com/django/django/blob/66150f7cf61bc09547fa98586790df596eff6d77/django/db/backends/sqlite3/client.py
|
|
Match the expected type with the input.
|
|
Forgot to add an `it` block for my test, which resulted in it failing
with a non-obvious error message.
|
|
Make an empty container to pass the basic tests.
|
|
Thinking up an interface for generating command line arguments for the
`psql` command. Based on Django's dbshell:
https://github.com/django/django/blob/66150f7cf61bc09547fa98586790df596eff6d77/tests/dbshell/test_postgresql_psycopg2.py
|