<feed xmlns='http://www.w3.org/2005/Atom'>
<title>dbshell-rails/spec, branch v0.0.2</title>
<subtitle>A Rake task for Ruby on Rails to painlessly open a database shell</subtitle>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/dbshell-rails/'/>
<entry>
<title>DBShell::Client::Postgres: Convert port to string</title>
<updated>2017-04-29T21:32:17+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2017-04-29T21:32:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/dbshell-rails/commit/?id=3c522fc313f76dfbb7d1e87703965780245a432c'/>
<id>3c522fc313f76dfbb7d1e87703965780245a432c</id>
<content type='text'>
Turns out the port actually did need to be a string, contrary to what I
had assumed in e89275bc787ae17bc698ac8cdb8cdaf5ebeb7852. I ended up with
this error when passing a specific port in a real test:

    $ bake dbshell
    rake aborted!
    TypeError: no implicit conversion of Fixnum into String
    .../lib/dbshell/client/postgres.rb:8:in `exec'
    .../lib/dbshell/client/postgres.rb:8:in `runshell'
    .../lib/dbshell/client/database.rb:24:in `runshell'
    .../lib/dbshell/rails/tasks/dbshell.rake:6:in `block in &lt;top (required)&gt;'
    .../versions/2.3.3/bin/bundle:22:in `load'
    .../versions/2.3.3/bin/bundle:22:in `&lt;main&gt;'
    Tasks: TOP =&gt; dbshell
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Turns out the port actually did need to be a string, contrary to what I
had assumed in e89275bc787ae17bc698ac8cdb8cdaf5ebeb7852. I ended up with
this error when passing a specific port in a real test:

    $ bake dbshell
    rake aborted!
    TypeError: no implicit conversion of Fixnum into String
    .../lib/dbshell/client/postgres.rb:8:in `exec'
    .../lib/dbshell/client/postgres.rb:8:in `runshell'
    .../lib/dbshell/client/database.rb:24:in `runshell'
    .../lib/dbshell/rails/tasks/dbshell.rake:6:in `block in &lt;top (required)&gt;'
    .../versions/2.3.3/bin/bundle:22:in `load'
    .../versions/2.3.3/bin/bundle:22:in `&lt;main&gt;'
    Tasks: TOP =&gt; dbshell
</pre>
</div>
</content>
</entry>
<entry>
<title>DBShell::Client::Database: Add support for the 'postgis' adapter</title>
<updated>2017-04-29T21:26:59+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2017-04-29T21:26:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/dbshell-rails/commit/?id=ad34e0127eae4965f4e48c132e06b3dfba474d18'/>
<id>ad34e0127eae4965f4e48c132e06b3dfba474d18</id>
<content type='text'>
PostGIS is, for our purposes, no different from Postgres. Both should
launch `psql`.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
PostGIS is, for our purposes, no different from Postgres. Both should
launch `psql`.
</pre>
</div>
</content>
</entry>
<entry>
<title>Integrate MySQL support</title>
<updated>2017-04-29T20:58:11+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2017-04-29T20:58:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/dbshell-rails/commit/?id=fb9ff6eb8cbad57b3ca2bbd58dc098f208edd1e1'/>
<id>fb9ff6eb8cbad57b3ca2bbd58dc098f208edd1e1</id>
<content type='text'>
* Create a `.runshell()` method in `DBShell::Client::MySQL`
* Delegate to that class &amp; method from `DBShell::Client::Database`
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* Create a `.runshell()` method in `DBShell::Client::MySQL`
* Delegate to that class &amp; method from `DBShell::Client::Database`
</pre>
</div>
</content>
</entry>
<entry>
<title>Rename `InvalidDatabaseAdapter` to `UnsupportedDatabaseAdapter`</title>
<updated>2017-04-29T20:54:27+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2017-04-29T20:54:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/dbshell-rails/commit/?id=56a002d2681431b34be36cf7247dc41a313601d9'/>
<id>56a002d2681431b34be36cf7247dc41a313601d9</id>
<content type='text'>
Tried this out with MySQL, and got this error since I haven't integrated
it yet. It struck me that "Invalid" doesn't make any sense. Really it's
something that is possible to do but that our gem doesn't support, so we
should be clearer about that fact.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Tried this out with MySQL, and got this error since I haven't integrated
it yet. It struck me that "Invalid" doesn't make any sense. Really it's
something that is possible to do but that our gem doesn't support, so we
should be clearer about that fact.
</pre>
</div>
</content>
</entry>
<entry>
<title>Add `DBShell::Client::MySQL`</title>
<updated>2017-04-29T20:49:10+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2017-04-29T20:49:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/dbshell-rails/commit/?id=575141e4efc770a4207eb5d905819d4017731f65'/>
<id>575141e4efc770a4207eb5d905819d4017731f65</id>
<content type='text'>
For now only includes a `.build_command()` method.

Inspired again by:
https://github.com/django/django/blob/66150f7cf61bc09547fa98586790df596eff6d77/django/db/backends/mysql/client.py

although in our case we haven't handled some of the more exotic options.
Eventually we'll probably have to do that.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
For now only includes a `.build_command()` method.

Inspired again by:
https://github.com/django/django/blob/66150f7cf61bc09547fa98586790df596eff6d77/django/db/backends/mysql/client.py

although in our case we haven't handled some of the more exotic options.
Eventually we'll probably have to do that.
</pre>
</div>
</content>
</entry>
<entry>
<title>Rename `Sqlite3` class to `SQLite3`</title>
<updated>2017-04-29T20:32:33+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2017-04-29T20:32:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/dbshell-rails/commit/?id=3c5729137d4ea81c607bfc9422ceaeb1056081c5'/>
<id>3c5729137d4ea81c607bfc9422ceaeb1056081c5</id>
<content type='text'>
To match the 'sqlite3' gem's and the SQLite project's capitalisation
convention.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
To match the 'sqlite3' gem's and the SQLite project's capitalisation
convention.
</pre>
</div>
</content>
</entry>
<entry>
<title>Move `DBShell::InvalidDatabaseAdapter` to the `Client` module</title>
<updated>2017-04-29T20:30:06+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2017-04-29T20:30:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/dbshell-rails/commit/?id=ff2d18994bc5d885362b077fd6c70410b33a9605'/>
<id>ff2d18994bc5d885362b077fd6c70410b33a9605</id>
<content type='text'>
Now that we have a `Client` module
(46b019abd520870ab159b60c03c45675f64dd88a), it makes so much more sense
to put this error class inside it.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Now that we have a `Client` module
(46b019abd520870ab159b60c03c45675f64dd88a), it makes so much more sense
to put this error class inside it.
</pre>
</div>
</content>
</entry>
<entry>
<title>Rename database client classes</title>
<updated>2017-04-29T20:21:01+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2017-04-29T20:21:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/dbshell-rails/commit/?id=46b019abd520870ab159b60c03c45675f64dd88a'/>
<id>46b019abd520870ab159b60c03c45675f64dd88a</id>
<content type='text'>
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 `&lt;top (required)&gt;': uninitialized constant DBShell::Client (NameError)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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 `&lt;top (required)&gt;': uninitialized constant DBShell::Client (NameError)
</pre>
</div>
</content>
</entry>
<entry>
<title>Update `require` paths in database client files</title>
<updated>2017-04-29T20:15:19+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2017-04-29T20:15:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/dbshell-rails/commit/?id=6f4057392857313355769de7fea293b5e50f0779'/>
<id>6f4057392857313355769de7fea293b5e50f0779</id>
<content type='text'>
Change the paths in the code to conform to the new file layout
introduced in b700c1bef89a67a64f1040fb6bb03c0320eefe91.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Change the paths in the code to conform to the new file layout
introduced in b700c1bef89a67a64f1040fb6bb03c0320eefe91.
</pre>
</div>
</content>
</entry>
<entry>
<title>Rename database client files to put them in a `Client` module</title>
<updated>2017-04-29T19:55:48+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2017-04-29T19:55:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/dbshell-rails/commit/?id=b700c1bef89a67a64f1040fb6bb03c0320eefe91'/>
<id>b700c1bef89a67a64f1040fb6bb03c0320eefe91</id>
<content type='text'>
Will be modifying the class names in the next commit. Here we change the
file names &amp; locations of the database client files.

The format changes thusly:

    &lt;adapter&gt;_client.rb -&gt; client/&lt;adapter&gt;.rb

This organisation feels cleaner to me. Wasn't liking the previous
structure.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Will be modifying the class names in the next commit. Here we change the
file names &amp; locations of the database client files.

The format changes thusly:

    &lt;adapter&gt;_client.rb -&gt; client/&lt;adapter&gt;.rb

This organisation feels cleaner to me. Wasn't liking the previous
structure.
</pre>
</div>
</content>
</entry>
</feed>
