Commit: a2768bc36bb2cd9d04f16e459efed52a4f5c5c62
Author: Mark Lawrence <nomad@null.net> Fri, 28 Mar 2008 15:53:40 +0100
SQL::DB
Replace the horrible txn() return type (a two-item list) by a
single Return::Value object. Should prevent people (ie me in
t/12-txn.t) from doing silly things like "if ($db->txn(...)) { }"
which of course is always true. If only DBI had used something like
this...
Makefile.PL, debian/control
Require Return::Value.
CPAN
Uploaded as v0.13.
Commit: 144bb351757686fba990de5cee6be65024bb7bc3
Author: Mark Lawrence <nomad@null.net> Fri, 28 Mar 2008 15:12:03 +0100
t/*
Moved the database population routines from live.t into TestList.pm
Commit: 08a40dffd0da43ad4a5bc969a4bf55a22381cce3
Author: Mark Lawrence <nomad@null.net> Tue, 25 Mar 2008 23:50:19 +0100
SQL::DB
deploy() now run as a transaction.
_nopc (no prepare_cached) methods created for do(), fetch() and
fetch1(). The original methods now all use prepare_cached by default.
Call $sth->finish on do() and fetch1() methods. Should get rid of the
"Statement handle still Active" messages which caused v0.11 to fail
for every CPAN tester. I can't reproduce the problem locally so this is
a bit of a guess.
SQL::DB::Cursor
New internal method "_finish()" to allow SQL::DB->fetch1() to finish
off the statement handle after the first row is retrieved.
All
Copyright for 2008.
CPAN
Uploaded as v0.12.
Commit: 918fe71acbe5553379cda9140cf13b133e11136c
Author: Mark Lawrence <nomad@null.net> Tue, 25 Mar 2008 11:50:48 +0100
SQL::DB
Reduced fetch1() down to a simple fetch()->next.
Commit: a7376604a334c9721c42ef1319d3ac82dcd52f3c
Author: Mark Lawrence <nomad@null.net> Fri, 21 Mar 2008 09:38:46 +0100
SQL::DB
Added support for recursive (from Perl's point of view) transactions.
SQL::DB::Query
Fixed a regular expression issue that wasn't removing the table
alias/prefix for non-select statements.
CPAN
Uploaded as v0.11.
Commit: 62f08702983970abfaa83d2b0ba55483ad31a802
Author: Mark Lawrence <nomad@null.net> Mon, 12 Nov 2007 19:24:09 +0100
SQL::DB::Row
new_from_array() and new() now properly set the original and modified
flags on column values.
New method: _column_names() returns a list.
SQL::DB::Schema
New EXISTS() function, maps straight to the SQL EXISTS. Is uppercase
to avoid conflicting with the Perl 'exists'.
SQL::DB::Schema::AColumn
New is_not_null() method, maps to SQL 'IS NOT NULL'.
SQL::DB::Schema::ARow
Abstract rows IDs (t0, t1 etc) are now prefixed with the table name,
not 't'. Makes the statements much clearer when debugging. The id is
now tied to the object and is reused after the object is destroyed.
So now statements will generally always have the same query text
(provided the query is the same) which is important when wanting to
make use of DBI's prepare_cached() method.
SQL::DB::Schema::Expr
New '*' and '/' overloads.
New not_between() 'NOT BETWEEN' method.
Bugfix: Now properly produce statements in the correct order for all
operators for which order matters. Eg: - / > >= < <=
Commit: 38f8cad4482e1f105faddaaac897a444f224f1a7
Author: Mark Lawrence <nomad@null.net> Mon, 12 Nov 2007 19:03:05 +0100
New SQL::DB::quickrows() method for dumping object/row values as a table.
Commit: d6e8f9fef3f9f8eee58e4bfb880dd0dac95ac6b1
Author: Mark Lawrence <nomad@null.net> Mon, 05 Nov 2007 02:23:48 +0100
SQL::DB::Row
Bugfix: _hashref() was working it's way through the known columns list,
not the method list, generating a hash with missing keys or overwritten
values.
Bugfix: q_update() was previously unaware of the relationship between
columns and ARows. So if you fetched a self join then q_update would
not produce the correct updates.
Commit: a450055fd2c3cce34f63ff43ff10b2307a0eb5b1
Author: Mark Lawrence <nomad@null.net> Sun, 04 Nov 2007 20:26:34 +0100
SQL::DB
Sequence rows now automatically created in 'sqldb' for every table.
SQL::DB::Row
Added support for Expr-based columns to be used for the row definition,
in a similar way to AColumns.
New _hashref() and _hashref_modified() methods which return key/value
versions of the row object.
New quickdump() utility method for printing out the object.
SQL::DB::Schema
New acol() method to generate Expr-based objects. Will probably get
renamed shortly to expr()...
CASE ... WHEN ... THEN ... ELSE support via the case() function.
SQL::DB::Schema::Query
New _alias() method, which is in support of Query objects being used in
nested selects. Ie SELECT ... FROM ($query) now sets AS properly.
Commit: 4171b4f319267bdd75fa246584fafefb8c276351
Author: Mark Lawrence <nomad@null.net> Thu, 01 Nov 2007 13:19:37 +0100
Column reference loop detection.
When column in table A references table B, and a column in table B also
references table A then the tables are undeployable. SQL::DB->deploy() now
croaks after too many iterations through the deployment order calculation.
Commit: ea1f8320148a8b64413d220040d73e193463a015
Author: Mark Lawrence <nomad@null.net> Wed, 31 Oct 2007 21:31:24 +0100
Added new tests for BLOB columns. Some of them currently fail due to what
I think is a bug in SQLite. Even when data inserted is bound as SQL_BLOB
DBD::SQLite still sets utf8 flag when $dbh->{unicode} is set to true.
Commit: cd9e5ee33e94369786f2eed8840782a331e58112
Author: Mark Lawrence <nomad@null.net> Tue, 30 Oct 2007 15:29:54 +0100
SQL::DB
Simplification of the table deployment order logic. There may have
been a bug in the old code (which I couldn't find) but things
definately work correctly now.
Commit: a3467da8edd44c5ac18af10fa477d21835ebfc95
Author: Mark Lawrence <nomad@null.net> Mon, 29 Oct 2007 12:58:56 +0100
SQL::DB
Added transaction support via the txn() method. Removed unecessary
begin/commit statements from seq().
SQL::DB::Query
Added select_distinct command.
Commit: 7f4e409b243bbc9d7f031f97bfc62ebdf408aa19
Author: Mark Lawrence <nomad@null.net> Thu, 18 Oct 2007 11:20:24 +0200
SQL::DB
Fixed a bind parameters bug which was resulting in the very strange
message from DBI "insufficient data in message" in certain cases.
Fixed fetch1() to properly detect and report failure.
SQL::DB::Row
Trivial cleanup of some internal _inflate/_deflate method names.
CPAN
Uploaded as v0.10.
Commit: 0a4d4a41c92b5fe5bfe06aace9642bf1e6a56f0a
Author: Mark Lawrence <nomad@null.net> Tue, 16 Oct 2007 11:17:51 +0200
Change testing infrastructure to use File::Temp for secure tempory file
creation and deletion. Fixes the bug reported by Andreas König at
http://rt.cpan.org/Ticket/Display.html?id=30019
Commit: 1a5494d772da8bb82379d3cc71c4afc384452e4e
Author: Mark Lawrence <nomad@null.net> Mon, 15 Oct 2007 13:47:59 +0200
SQL::DB::Row
* New _modified() method for classes derived from Row.
* Don't inflate/deflate undefined columns.
* New q_delete() method.
* Check for NULL primary columns in q_* methods.
SQL::DB::Schema
SQL functions: LOWER & UPPER
SQL::DB::Column
New 'type_pg' and 'bind_type_pg' values for postgres specific
definitions.
SQL::DB::Table
New db_type() method for supporting changes in Column.
CPAN
Uploaded as version 0.09.
Commit: 7d8778e984d3588acbc59caed7651bdbdf083509
Author: Mark Lawrence <nomad@null.net> Fri, 12 Oct 2007 18:53:22 +0200
SQL::DB::Cursor
New package.
Makefile.PL
Added DBD::SQLite to the build requirements.
SQL::DB
Return a Cursor object when fetch() is called in scalar context.
Proper binding of values with their bind-types in fetch().
t/pod-coverage.t
Trust undocumented methods from parent classes.
Commit: a120998139a271cb79e35378c739512f26c62fa7
Author: Mark Lawrence <nomad@null.net> Wed, 10 Oct 2007 19:01:00 +0200
t/09-db.t
Fixed number of tests to be run.
CPAN
Uploaded as v0.08. Kind of forced due to MySpam dependency on this
version.
Commit: 8c44023f11628335ef6bdc32c98fed31ec957b75
Author: Mark Lawrence <nomad@null.net> Wed, 10 Oct 2007 17:33:01 +0200
* Preliminary support Multi-faceted Table/Column Definitions.
The idea behind this is that certain definitions have a 'normal' and a
'database' specific setting, and the right one gets automatically used at
runtime.
For example, say we have a binary column which under SQLite and MySQL the
'BLOB' type works fine, but under PostgreSQL we have to use 'BYTEA'.
Our column definition can now be like this:
[ name => 'bincol', type => 'BLOB', type_pg => 'BYTEA' ]
Internally SQL::DB at connect() time tells the tables what kind of
database we have (based on the dbi: connection string) and the table
objects know which definition to use. 'type_pg' for postgres and 'type' for
everything else.
So far only implemented for things like the default character set and the
mysql ENGINE statement.
SQL::DB
Next sequence is now seq($name, $count) and the optional $count will
increment by that amount and return a list of ($count) unique ids.
Now set table database type at connect() time.
SQL::DB::Row
Detect and croak() if caller attempt to create a class with duplicate
column names.
SQL::DB::Schema::Table
Multifaced definition support for 'type', 'engine', 'default_charset'
and 'tablespace'.
Commit: 54c4bab43480306ad7cd9951f4e49e7014853f0e
Author: Mark Lawrence <nomad@null.net> Wed, 10 Oct 2007 12:53:58 +0200
* Small documentation update to SQL::DB.
* Removed useless SQL::DB::Schema::Query::push_bind_values().
CPAN
Uploaded as v0.07.
Commit: d3755e22be896a8d4ac9bbb988636708c227f5ae
Author: Mark Lawrence <nomad@null.net> Wed, 10 Oct 2007 12:08:44 +0200
Fixed circular-reference memory leak between ARows and AColumns.
Makefile.PL, debian/control
Added dependency on Test::Memory::Cycle and libtest-memory-cycle-perl.
t/*
Test most objects for circular references.
Commit: f06f0e329930c7a9055acfd60937e035e7893e92
Author: Mark Lawrence <nomad@null.net> Wed, 10 Oct 2007 09:32:38 +0200
SQL::DB::Schema
Schema objects are no longer responsible for define()ing tables.
$obj->define() has been replaced by the class subroutine
define_tables(). This fixes the issue of persisent (or other)
environments unecessarily redefining the schema each time an object
is created.
The new() method now takes an (optional) list of table names and takes
the definition from the class as needed.
SQL::DB
deploy() now calculates the table order based on sql REFERENCES
values so that referenced tables exists before the referring
column/table is created..
Commit: 8b8eae32cf673bcc85525c8411b10fc0a4c3a9a2
Author: Mark Lawrence <nomad@null.net> Mon, 08 Oct 2007 23:51:08 +0200
Added support for DBI bind types. Each column can now have a 'bind_type'
definition which will be used for INSERT and UPDATE queries. The reason
it got implemented this way at the moment is because I needed an SQL_BLOB
column with SQLite and they were the only query types that caused me issues.
Should it be standard for all query types?
Commit: 92a496ef78c40cb8cf808869c555f0872a270281
Author: Mark Lawrence <nomad@null.net> Mon, 08 Oct 2007 17:52:50 +0200
SQL::DB
In query_as_string() only quote values that are printable, otherwise
insert the string *BINARY DATA* into the output.
SQL::DB::Row
Bugfix: sub new() now correctly set column status as ORIGINAL or
MODIFIED based on the initial values. No longer calls
new_from_arrayref().
Moved _inflate() and _deflate() into the classes themselves. Row is now
'invisible' (ie no in the inheritance tree) although that is not the
goal.
Bugfix: sub q_insert() now correctly handles multiple-column primary
keys.
Commit: 56d452512d4ca1d5d12f092a783871e950c6f0b1
Author: Mark Lawrence <nomad@null.net> Mon, 08 Oct 2007 13:46:00 +0200
SQL::DB::Row
Moved new_from_arrayref() directly into the classes instead of being
inherited in order to ensure the STATUS condition exists for every
column of a new object.
SQL::DB::Schema::Column "default" values (or methods) are now set at
object instantiation.
SQL::DB::Table
Use SQL::DB::Row instead of SQL::DB::Object for base of table classes.
SQL::DB::Object.
Removed.
Commit: 0e69c4f7a0c9f954a9a2be9bfe1239693c272ea8
Author: Mark Lawrence <nomad@null.net> Mon, 08 Oct 2007 12:02:21 +0200
SQL::DB::Row
Bugfix: Now correctly check for inflate condition when defining
_deflate() method;
new() method renamed to new_from_arrayref().
Each class now gets a new() method that takes either a hashref or a list
of key/value pairs and in turn calls new_from_arrayref().
Each class now gets a q_insert() method (similar to q_update()).
Commit: 7ee91556aeef08c37b3db405655183b44f9aeb3c
Author: Mark Lawrence <nomad@null.net> Sun, 07 Oct 2007 16:17:32 +0200
SQL::DB
Documentation cleanup.
Commit: 3cfe21630f03a77ba6bd6c6f1a3c7ca7ad4e63f2
Author: Mark Lawrence <nomad@null.net> Sun, 07 Oct 2007 14:19:30 +0200
Added tests for POD coverage.
SQL::DB
Removed execute(),objects(),fetcho() & fetcho1() methods.
Commit: 5c3708a19e77ca5cbd7ce918d236cc57d578fb65
Author: Mark Lawrence <nomad@null.net> Sat, 06 Oct 2007 12:38:05 +0200
SQL::DB
All $self->{sqldb_dbh} access is now $self->dbh for better override
behaviour.
Moved all of SQL::DB::Schema::Functions into SQL::DB::Schema.
Commit: 3356d7dd17c1294638e19c32ced1876d30db1349
Author: Mark Lawrence <nomad@null.net> Fri, 05 Oct 2007 16:48:25 +0200
Moved AColumn, ARow, Column, Table, Function and Query all underneath the
SQL::DB::Schema namespace.
Added outline documentation to all modules.
Commit: 8a652f903b734c08d9d1906b467771c914597d40
Author: Mark Lawrence <nomad@null.net> Thu, 04 Oct 2007 18:32:15 +0200
Uploaded to CPAN as v0.06
Commit: 34bcbe5cc9bdc0428b5c637442bfbb9899716e72
Author: Mark Lawrence <nomad@null.net> Thu, 04 Oct 2007 17:24:10 +0200
SQL::DB
* Deal with broken MySQL table_info filtering
* seq(): LOCK both 'sqldb' and the alias. Added missing UNLOCK
Commit: 854055f98cdc556e3947f5ea00386ddb6a7068ee
Author: Mark Lawrence <nomad@null.net> Wed, 03 Oct 2007 19:05:50 +0200
SQL::DB
Make update(), insert(), delete() return true if successful.
Commit: 4f45a93491a59dae8a097148139e7194d6df32fc
Author: Mark Lawrence <nomad@null.net> Mon, 01 Oct 2007 17:00:30 +0200
Moved SQL::DB::Intro back to SQL::DB::Tutorial. Still incomplete...
Commit: 15e27509cf684c3bb911c9de93c417458f94009d
Author: Mark Lawrence <nomad@null.net> Mon, 01 Oct 2007 16:09:14 +0200
SQL::DB
LOCK TABLES command for MySQL sequence emulation.
Commit: 2667ea0ea84ed5d272c382809dabfe958e0dcb1c
Author: Mark Lawrence <nomad@null.net> Mon, 01 Oct 2007 15:44:59 +0200
SQL::DB
Improved the debugging output to show a real SQL statement with the
bind values actually quoted inline. This means you can now cut and
paste the text into an SQL session in order to see the actual result.
Commit: 556a0de835016f472e6db3de3cc435bc4beb34e5
Author: Mark Lawrence <nomad@null.net> Thu, 27 Sep 2007 19:47:19 +0200
SQL::DB
Fixed sequence support to actually check that an update occurs when
incrementing the value. Aparently MySQL SELECT .. FOR UPDATE doesn't
actually lock rows (MySQL bug?)
SQL::DB::Query
Added INTERSECT operator.
Commit: 09b3ac307a1a2fdc0be6f831f7946b68aa88f88f
Author: Mark Lawrence <nomad@null.net> Wed, 19 Sep 2007 09:54:29 +0200
General
New: Inflation of columns upon SELECT. Deflation in the works.
All _new() methods have become new() to be more standard.
SQL::DB
Clearer error messages on some failure/error conditions.
Fixed position of FOR UPDATE in the internal sequence support.
fetch()/fetch1() adjusted to the new SQL::DB::Row implementation.
Documentation cleanup.
SQL::DB::Row
Complete rewrite to be a more intelligent object. Now keeps track of:
a) the SQL::DB::Columns associated with the query / class; and b) the
columns that have been modified. So now we can call q_update() and
get a list of statements for each table to update the modified columns.
SQL::DB::Expr
New utility methods val() and set_val() for use by parent classes
(abstracts away the internals which AColumn had been using).
New between() (SQL BETWEEN) method. Just realised should be in AColumn.
SQL::DB::Function
New SQL functions: CAST, NOW
Big cleanup / refactoring.
SQL::DB::Query
Removed the unused column_names() method.
SQL::DB::Schema, SQL::DB::Table
Moved the guts of the arow() method from Schema to Table where it
belongs. Thinking about renaming it atable() as that is what it looks
like it is when writing queries.
SQL::DB::AColumn
as_string(), _clone() and _as() all moved/removed into the parent
SQL::DB::Expr class as they are more general methods than just AColumn.
SQL::DB::Column
New "inflate" and "deflate" definitions to for modifying column data
between the database and the SQL::DB::Row objects.
"default" definition now accepts a subref as well scalars.
SQL::DB::Object
Runs the "default" method for a column if it is a CODE ref, when
creating objects.
Commit: 26a1fab79ebd6f23e1d563056bfdbf9f8625bfe7
Author: Mark Lawrence <nomad@null.net> Sat, 15 Sep 2007 11:38:00 +0200
SQL::DB::Object
Fixed up q_* methods that were still using the old ->arow.
SQL::DB
Fixed up broken query count reporting.
Properly removed the simple object support.
SQL::DB::Query
Removed 'selecto' option (not very SQL'ish).
Commit: 888d13f9f4bb1547f35c682ba1003eed2903f53b
Author: Mark Lawrence <nomad@null.net> Fri, 14 Sep 2007 15:43:59 +0200
Syntax changes:
Abstract rows are now associated with table names only and must be
obtained via $db->arow($tablename). The old "Artist->arow" or
"Artist::Abstract->new" are gone.
SQL::DB::Table
Abstract classes are now named SQL::DB::ARow::<tablename>
SQL::DB::Row
New module providing lightweight ARRAY-based objects. This
functionality has been removed from SQL::DB. I should be able to
replace this with something from CPAN but couldn't find the right thing
yet.
SQL::DB
fetch() and fetch1() now use the most efficient DBI calls to obtain
data.
New methods fetcho() and fetcho1() for retrieving full objects. These
should eventually moved out of SQL::DB entirely? SQL::DBO?
Documentation cleanup.
SQL::DB::Function
Added PostgreSQL nextval(), currval() and setval() functions.
SQL::DB::Object
Removed arow() method. SQL::DB::Object should be completely decoupled
from anything else.
SQL::DB::Schema
New arow() method.
t/*
Various additions and cleanups.
Commit: 5cc2c48074503df92da8f2eb04e1bfad33dafd61
Author: Mark Lawrence <nomad@null.net> Fri, 14 Sep 2007 10:04:38 +0200
General:
What is it with UNIVERSAL qw(isa) not letting me use 'isa()' on its
own?
SQL::DB::Query
Removed st_columns (old alias for st_select) as it doesn't look like
anything SQL.
CPAN
Uploaded as 0.05.
Commit: 68422f5b3549d0cb1f0f7387d884641a6e31bf08
Author: Mark Lawrence <nomad@null.net> Fri, 14 Sep 2007 01:49:17 +0200
New syntax for UPDATE:
update => [$table->set_column($value)]
# or
update => [$table->column->set($value)]
SQL::DB::Expr
Minor cleanup of "" overloading methods.
SQL::DB::AColumn
Reworked internals based on SQL::DB::Expr changes in previous commit.
SQL::DB::Table
Added dynamically generated "set_column" methods to ARows for new
UPDATE syntax.
SQL::DB::Query
Removed the "set => [...]" syntax.
Less duplication of parent class (Expr) methods.
Tests
A few more added to the mix.
Commit: 06b5561cef4479dff30ddb676620bfd4d5853437
Author: Mark Lawrence <nomad@null.net> Wed, 12 Sep 2007 21:23:17 +0200
SQL::DB::Functions
Renamed to SQL::DB::Function.
Big cleanup/rewrite with new support for MAX, MIN, COUNT & SUM.
Tests for all functions.
SQL::DB::Expr
Added missing tests to git.
SQL::DB::Schema
Now exports on request the Functions subroutines.
SQL::DB
Now exports on request the Functions subroutines.
Added example function use to the SYNOPSIS.
Commit: 3256dd399dffe0481f71d500f980e69e3677c7db
Author: Mark Lawrence <nomad@null.net> Wed, 12 Sep 2007 18:22:16 +0200
SQL::DB::Expr
Complete cleanup and factoring of code, with tests. Looks like this
class now does what it should.
Commit: ea8813c18ccfc8fba1f696bd7bfd6a86632f5f20
Author: Mark Lawrence <nomad@null.net> Tue, 11 Sep 2007 22:44:38 +0200
SQL::DB::Functions and t/functions.t added.
Commit: 1cdb044cb1e13e4d678c3fe94e04232de42523c4
Author: Mark Lawrence <nomad@null.net> Mon, 10 Sep 2007 10:17:38 +0200
SQL::DB::Table: simplified 'setup_columns' to use 'setup_column'
Commit: 295650d9f006a81f2fd74ba4ada7d0267e2a4af9
Author: Mark Lawrence <nomad@null.net> Sun, 09 Sep 2007 21:50:46 +0200
* Built-in sequences support.
* All internal hash keys now prefixed by 'sqldb_'.
* New SQL::DB::Functions package. First function 'coalesce' created.
Commit: 912f076f80903d94edc60d2e430dd918549a0c89
Author: Mark Lawrence <nomad@null.net> Sat, 08 Sep 2007 21:04:57 +0200
SQL::DB now inherits directly from SQL::DB::Schema. Hence schema() method
removed and define() and query() come directly from parent class.
Fixed up bug in t/synopsis.t and cleaned up SYNOPSIS to actually run.
Documentation for above updated.
New sql_create(), sql_create_table() and sql_create_indexes() methods for
SQL::DB::Table. t/02-table.t updated to test for these.
Commit: 40b94121a45e3a5bac08bab01bf9d4be2bb8a4f4
Author: Mark Lawrence <nomad@null.net> Sat, 08 Sep 2007 19:58:07 +0200
Added a fetch1() method to return a single value.
Commit: 96859c4215b51866166cd4433f3373807de533da
Author: Mark Lawrence <nomad@null.net> Sat, 08 Sep 2007 19:44:54 +0200
Fixed a Query bug where not all table aliases were removed in non-SELECT
statements.
Commit: a8ec7eb4dec4168e3f817d98c874fe995c450fa9
Author: Mark Lawrence <nomad@null.net> Thu, 06 Sep 2007 16:44:04 +0200
Added MySQL table ENGINE|TYPE.
Added unique_index as a shortcut for index => [unique => 1, ...]
Commit: 4a5cde2bef168ddc6ed18d62c84807cbccea41d1
Author: Mark Lawrence <nomad@null.net> Thu, 06 Sep 2007 14:38:16 +0200
Removed requirement for Perl 5.8. Not sure why it was set in the first
place - maybe to do with Scalar::Util::weaken support?
Commit: e59dac4fd11d854760b4556f238ef548dd639937
Author: Mark Lawrence <nomad@null.net> Wed, 05 Sep 2007 14:43:21 +0200
VERSION to 0.05
Commit: c2ed27063c0348ba3750221a3a1f5423ed09590a
Author: Mark Lawrence <nomad@null.net> Wed, 05 Sep 2007 13:50:54 +0200
Debian control description and changes update.
Released to CPAN as version 0.04.
Commit: 011f261861eae7d691705f407aed9def3159e02c
Author: Mark Lawrence <nomad@null.net> Wed, 05 Sep 2007 13:42:51 +0200
README updates.
Commit: b2b8c4b54ac10be771adb3c3326925bdf641e01a
Author: Mark Lawrence <nomad@null.net> Wed, 05 Sep 2007 13:37:44 +0200
Added a test to extract and run the SYNOPSIS code.
Commit: d0a72e93800d22b937e91a452375bec782ea3667
Author: Mark Lawrence <nomad@null.net> Wed, 05 Sep 2007 13:18:58 +0200
The SYNOPSIS from SQL::DB is now a fully working example.
Commit: bdf5b8ddb467544bdf94e2eae653aafc4e83aaca
Author: Mark Lawrence <nomad@null.net> Wed, 05 Sep 2007 13:18:19 +0200
Fixed "index" to allow just the column name as well as an ARRAY ref.
Commit: d0a6f5870ff8b5e751ff9555b9a4c8ccc7a651d1
Author: Mark Lawrence <nomad@null.net> Wed, 05 Sep 2007 13:17:18 +0200
Make new() and alias for _new() in SQL::DB::ARow. Not yet decided what
the final api should be.
Commit: 379073cc98768bd2fc38df76b6d077099a7791cf
Author: Mark Lawrence <nomad@null.net> Wed, 05 Sep 2007 13:16:26 +0200
Fixed ASC and DESC to be returned as SQL::DB::Expr objects.
Commit: 51e6cc803244b946695c9c13c5995eb7a474726a
Author: Mark Lawrence <nomad@null.net> Wed, 05 Sep 2007 13:13:49 +0200
Added "ref" as an alias for "references" when defining columns.
Commit: a473e84314dceffc5c066e0960f97609ad522113
Author: Mark Lawrence <nomad@null.net> Wed, 05 Sep 2007 11:12:55 +0200
Added "column" definition support (singular version of "columns") to
the SQL::DB::Table creation syntax.
Commit: 180cc3d582ea98caf43ea82aa7cd9f64bb4cdc00
Author: Mark Lawrence <nomad@null.net> Wed, 05 Sep 2007 10:49:59 +0200
t/live updated to test recent changes.
Commit: 9490c507a90a37f1a580d71e63c02625b245c6d1
Author: Mark Lawrence <nomad@null.net> Wed, 05 Sep 2007 10:49:04 +0200
Added the start of a SQL::DB::Tutorial.
Commit: a05fac56794211c87e845dd9332e60ad3b04845d
Author: Mark Lawrence <nomad@null.net> Wed, 05 Sep 2007 10:48:34 +0200
Added temporary set() function to SQL::DB::AColumn so that one can
write "set => [$arow->acolumn->set($val)]" statements. Considering using
the modifiable subroutine lvalue (Experimental) support in perl so that
we can write "set => [$arow->acolumn = $val]" instead, which is much
more SQL-like.
Commit: 483dcdb6322a38cbcc1bf34f9c5cac154314d026
Author: Mark Lawrence <nomad@null.net> Wed, 05 Sep 2007 10:39:06 +0200
SQL::DB::Expr: New Expressions: <=, >=, +
Commit: 7a2308396da2a587eb7683d8185dedfdbb95f492
Author: Mark Lawrence <nomad@null.net> Wed, 05 Sep 2007 10:36:39 +0200
Minor documentation edits to SQL::DB::Schema.
Commit: f08e45dda5356e4afa8352ed1cc4edbb50c91e3a
Author: Mark Lawrence <nomad@null.net> Wed, 05 Sep 2007 10:35:27 +0200
SQL::DB::Object: Fixes to "columns changed?" related methods.
Commit: 8ab138d050aa899b369fa837fc0a17426378d79a
Author: Mark Lawrence <nomad@null.net> Wed, 05 Sep 2007 10:33:22 +0200
Added SQL::DB::Query->wantobjects, ->arows, "selecto" methods.
Commit: 96ab59b7dce96fd0fca7bfab8273d03fcee22fe3
Author: Mark Lawrence <nomad@null.net> Wed, 05 Sep 2007 10:28:53 +0200
Major API change and cleanup of DB.pm
* Objects now created with new()
* New methods: define(), connect_cached(), qcount(), fetch()
* Removed: do_query(), so()
* Removed Tutorial - will go into new SQL::DB::Tutorial.pod
* Documentation matches code.
Commit: 7258a65796db7c15ff566f4fd367e17540ecb8ef
Author: Mark Lawrence <nomad@null.net> Wed, 22 Aug 2007 19:02:04 +0200
Added method SQL::DB::Table->primary_column_names()
Commit: f60a61b53ff54dd1f118d1944fd14df429a24ca1
Author: Mark Lawrence <nomad@null.net> Tue, 21 Aug 2007 17:03:55 +0200
Added 'bases' (inherit from class) support to SQL::DB::Table
Commit: 12db827f6ea8843c8bb6dacdcc52401c3c3d3eb3
Author: Mark Lawrence <nomad@null.net> Tue, 21 Aug 2007 11:36:29 +0200
Tests & Cleanups
Commit: d4179cd7ff8e466e8defcd8719861b300e28c9fc
Author: Mark Lawrence <nomad@null.net> Mon, 20 Aug 2007 23:41:54 +0200
Removed old t/02-abstract.t
Commit: 2dfe862c919b7bdb0d95afae3427cebabe3ee176
Author: Mark Lawrence <nomad@null.net> Mon, 20 Aug 2007 23:00:45 +0200
New Schema for tests.
Commit: 47ce13fc4969ec12ad5728509040ebfc3c870188
Author: Mark Lawrence <nomad@null.net> Mon, 20 Aug 2007 22:59:20 +0200
Removed old t/Column.t
Commit: ebc942ba1bddee2810ab3823051038aed8ab655c
Author: Mark Lawrence <nomad@null.net> Mon, 20 Aug 2007 22:55:00 +0200
Added test for SQL::DB::Table
Commit: 9774e98a7f15546f8392ec6eb2f0799a27beaf5d
Author: Mark Lawrence <nomad@null.net> Mon, 20 Aug 2007 22:33:47 +0200
Added test for SQL::DB::Column
Commit: f1ba432caee86da98aafe9cecf626b09d8a667d6
Author: Mark Lawrence <nomad@null.net> Sun, 19 Aug 2007 23:37:03 +0200
Big simplification and cleanup of SQL::DB::AColumn. SQL::DB::AColumn::Func
has been removed as the func() method now clones and returns a new AColumn.
Commit: 548d34cd429a35ed6a9f87ac5cfd8a96897f9752
Author: Mark Lawrence <nomad@null.net> Sun, 19 Aug 2007 23:35:25 +0200
Added q_delete to SQL::DB::Object.
Commit: b35ed20f6514909de86a8d1067fe92ae798f9dbb
Author: Mark Lawrence <nomad@null.net> Sun, 19 Aug 2007 23:34:51 +0200
Minor cleanups to SQL::DB::Query
Commit: 0c185ee934a41f166c133417f0bb35b8a0842037
Author: Mark Lawrence <nomad@null.net> Sun, 19 Aug 2007 11:09:15 +0200
Can no longer call SQL::DB::Schema->arow. User code must now call
Class->arow, or Class::Abstract->new directly.
Commit: cf84b62b77e4033bacdf0886fb5bdc67f13ccbf8
Author: Mark Lawrence <nomad@null.net> Sun, 19 Aug 2007 11:07:32 +0200
SQL::DB::ARow is no longer responsible for creating the Abstract classes -
this is now handled by SQL::DB::Table.
Also includes a simplification - Removed all 'reference' code.
Commit: 8c254779201404d12e9f44afce6d419628db3f7a
Author: Mark Lawrence <nomad@null.net> Sun, 19 Aug 2007 11:06:07 +0200
SQL::DB::Table now automatically creates the Class, and the Abstract Class
for each table.
Commit: d24d6cc202ca4e911ce7532f732c3e5a97f0fd18
Author: Mark Lawrence <nomad@null.net> Sun, 19 Aug 2007 11:03:58 +0200
Cleanup and simplification of functions in SQL::DB::Column.
Commit: d70c4bff4d80dc269c59cb0b1faa39099bfb9dfc
Author: Mark Lawrence <nomad@null.net> Sun, 19 Aug 2007 11:01:43 +0200
Removed inc/Module/Install from git/cogito control.
Commit: df8970faa8b913035c3353f2f28164c5f776b687
Author: Mark Lawrence <nomad@null.net> Sat, 18 Aug 2007 20:32:52 +0200
Cleanup and Documentation for SQL::DB::Table
Commit: cb014d11455950c14c391b449546386ee04b307a
Author: Mark Lawrence <nomad@null.net> Sat, 18 Aug 2007 17:51:52 +0200
Turned SQL::DB::Column->references() into a lazy inflation function. This
means we don't care about the order in which tables are defined, although
it is still important because the database (eg PostgreSQL) still cares.
Commit: fba17d2a2364e49f874e3e233d3a523940b40c65
Author: Mark Lawrence <nomad@null.net> Sat, 18 Aug 2007 17:46:40 +0200
Less verbose debugging in SQL::DB::ARow
Commit: 29973dbca9bfda6232de6d36b75e798f0bc06138
Author: Mark Lawrence <nomad@null.net> Sat, 18 Aug 2007 17:37:41 +0200
Added basic AS support to SQL::DB::AColumn
Commit: f99f286dc7554b2d132042300b34ccd4964c4eff
Author: Mark Lawrence <nomad@null.net> Sat, 18 Aug 2007 17:08:54 +0200
SQL::DB::Schema now has only query() method. select(), update() etc are
gone.
Commit: ddc54037393f5ada7beeffc2e60f3d13bf4c815e
Author: Mark Lawrence <nomad@null.net> Sat, 18 Aug 2007 17:08:02 +0200
Added not equals '!=' expression type to SQL::DB::Expr.
Commit: de5034cbb93d4e6591aed5fadd79f58a9ddfaebb
Author: Mark Lawrence <nomad@null.net> Sat, 18 Aug 2007 17:01:05 +0200
Folded SQL::DB::Query::* into SQL::DB::Query. SQL::DB has basic support for
retrieving on-demand objects and SQL::DB::Object-based objects.
Commit: f4685ed0b44928b1ff6fbb8e88720e00981a6bc2
Author: Mark Lawrence <nomad@null.net> Sat, 18 Aug 2007 16:50:29 +0200
SQL::DB::Table now creates object classes based on SQL::DB::Object.
Commit: 4a79e6c2ffeb6f8e6f07bdfebdb60dab77df3ed3
Author: Mark Lawrence <nomad@null.net> Sat, 18 Aug 2007 16:49:27 +0200
Added new SQL::DB::Object class.
Commit: f6e3b2f5136537d232e86d13b4b4fd8e3a803e47
Author: Mark Lawrence <nomad@null.net> Tue, 26 Jun 2007 15:10:07 +0200
* Added Fans (of which an Artist has many) Link-table to the test schema
* Added hard dependency on DBI
Commit: 40e77ac1ec09887be04509ad2ebef45c7f0d81b5
Author: Mark Lawrence <nomad@null.net> Fri, 22 Jun 2007 01:59:29 +0200
* Properly implement ->func: now works for multiple function calls on
the same column.
* Removed one "weaken" too many in ARow.pm.
Commit: 25bc634ba5847284998f1cd9cc6cfa97017dc62a
Author: Mark Lawrence <nomad@null.net> Thu, 21 Jun 2007 10:58:17 +0200
Added GROUP BY support.
Commit: 38c5a95ca67ccd5179425a8f6d820359df3525a1
Author: Mark Lawrence <nomad@null.net> Wed, 20 Jun 2007 14:47:53 +0200
Converted SQL::DB::sth_to_simple_objects from Class::Struct =>
Class::Accessor::Fast. Removed dependency on Class::Struct.
Commit: ba606fbbb6acf8db66ba47f2b2ed48e5f482ffc4
Author: Mark Lawrence <nomad@null.net> Wed, 20 Jun 2007 13:59:17 +0200
Converted SQL::DB::Column from Class::Struct to Class::Accessor::Fast
New dependency on Class::Accessor
Commit: 593ba883145ce1cf4bd429041b9679f14f43c0e6
Author: Mark Lawrence <nomad@null.net> Wed, 20 Jun 2007 13:16:41 +0200
* Support for multiple 'unique' or 'index' statements in table definition.
This makes the schema definition syntax much cleaner as it does away with
some of the array refs.
* Fixed a PRIMARY KEY bug in CREATE TABLE statements.
Commit: 77651e8b419f067feabdc4692ed056b184e70f29
Author: Mark Lawrence <nomad@null.net> Wed, 20 Jun 2007 13:13:32 +0200
Test Schema: Moved table unique and index command to be multiple ARRAYREFs
Commit: 61c1a014cdc150e0dfc61ca8542199704d3d645f
Author: Mark Lawrence <nomad@null.net> Wed, 20 Jun 2007 00:25:19 +0200
Added brackets to UNION statements
Commit: 799bf0fbd52d92b4efbd2f9e80d23c0c2af504a5
Author: Mark Lawrence <nomad@null.net> Tue, 19 Jun 2007 23:33:26 +0200
Support for arbitrary database functions (count, max, min, etc)
Commit: 7638cfb9b0e9f1d26925bcfe74538233aa72ab31
Author: Mark Lawrence <nomad@null.net> Tue, 19 Jun 2007 21:26:39 +0200
Fixed a rather broken SQL::DB->schema method.
Commit: d723d3798029834d6642ab9b98d36beff3f784c0
Author: Mark Lawrence <nomad@null.net> Tue, 19 Jun 2007 20:48:09 +0200
Module::Install::Build no longer necessary and removed.
Commit: 7fb60ce1932cdf7cd0fa1cacc16460dc74e3cf3a
Author: Mark Lawrence <nomad@null.net> Tue, 19 Jun 2007 20:22:24 +0200
SELECT UNION Support.
Commit: 60cff74c7679104eb4ed73967c71a85e372cd05f
Author: Mark Lawrence <nomad@null.net> Tue, 19 Jun 2007 19:04:33 +0200
Added vim defaults to every module: # vim: set tabstop=4 expandtab:
Commit: a6f49bf880862def54c6b3ef0faf96af7299663a
Author: Mark Lawrence <nomad@null.net> Tue, 19 Jun 2007 18:16:18 +0200
Column.pm: Make Class::Struct class definition at compile time.
Commit: b5161ad74522bb17481f39c827fe744fd94293a0
Author: Mark Lawrence <nomad@null.net> Tue, 19 Jun 2007 18:05:00 +0200
Change references to SQL::Builder => SQL::Abstract since Builder is almost
invisible - ie not on CPAN.
Commit: ab78471a6657bbbadf71d6992a132a58da6e46bf
Author: Mark Lawrence <nomad@null.net> Tue, 19 Jun 2007 17:58:15 +0200
* Removed META.yml from git/cogito control
* Added t/live.t that uses a real database. First working example.
Commit: 62fd440d223a3e561d74f88cea43810468d7c8d6
Author: Mark Lawrence <nomad@null.net> Tue, 19 Jun 2007 17:07:38 +0200
Moved Insert.pm, Select.pm... to Query/Insert.pm, Query/Select.pm.
Commit: 6ffd03a8805a131a387bcf10c4dc1b8a81367529
Author: Mark Lawrence <nomad@null.net> Tue, 19 Jun 2007 16:44:22 +0200
* Removed 'Changes' file from cogito/git control.
* INSERT, SELECT, UPDATE, DELETE all do something!
Commit: c760740570c2f8a5ceb4b1d602228512061df917
Author: Mark Lawrence <nomad@null.net> Mon, 18 Jun 2007 16:38:18 +0200
VERSION to 0.02
Commit: 0643a835dc2413e843a041019e41199a4dff04a0
Author: Mark Lawrence <nomad@null.net> Mon, 18 Jun 2007 16:34:48 +0200
New class SQL::DB to glue SQL::DB::Schema with DBI. Fully documented.
Commit: 85567556ec241b35b60903eb6670e6f716f596bc
Author: Mark Lawrence <nomad@null.net> Mon, 18 Jun 2007 16:31:13 +0200
* Column.pm now based on Class::Struct which removed some lines.
* Schema definition is now completely based on ARRAY REFs.
* new test: t/Column.t
* new 'NOT IN' expression method
* Queries now all use 'columns' method, better inheritance.
* new 'EXISTS' method for query objects.
* Schema.pm: row() has become arow() 'any', 'abstact', 'a' row.
* Schema.pm: query() replaced by select(), insert(), delete(), update()
Commit: 3832282a9e4c32bba39215e612127321890d9f3c
Author: Mark Lawrence <nomad@null.net> Fri, 15 Jun 2007 18:50:24 +0200
* SQL::API::* renamed to SQL::DB::*
* SQL::API.pm renamed to SQL::DB::Schema.pm
Commit: c2f52970463af8d00abed84602cf25941a07b7c0
Author: Mark Lawrence <nomad@null.net> Fri, 15 Jun 2007 18:29:43 +0200
* Lots of cleanups.
* Avoid memory leaks from circular references using Scalar::Util::weaken
in the right places.
* SELECT .... LIMIT
* Stringifcation for pretty printing/debugging.
Commit: 9b6517b3eb74d356cc3b061c8a7dc4c020b7bc86
Author: Mark Lawrence <nomad@null.net> Sat, 09 Jun 2007 23:50:08 +0200
Now have automatic joins (matching up reference keys with primary columns)
INSERT and SELECT probably good for 90% of queries.
Commit: 667303900595982625b062f3af20bbbac1804da7
Author: Mark Lawrence <nomad@null.net> Fri, 08 Jun 2007 01:51:04 +0200
Big documentation write-up for SQL::API.
Testing of the SQL::API interface almost complete. No tests yet
for any of the subclasses.
Commit: 1ccf41060a623a7c8c1652f4c0c740b337d56abc
Author: Mark Lawrence <nomad@null.net> Thu, 07 Jun 2007 15:51:17 +0200
Big simplification of the api.
INSERT and SELECT working.
WHERE statements automatically produce correct FROM table aliases.
Commit: 523be54f484c31a53de1e0bdf36e158db2343bcc
Author: Mark Lawrence <nomad@null.net> Sat, 02 Jun 2007 23:19:28 +0200
Table and Column classes now handle UNIQUE and FOREIGN KEY statements.
Commit: 179815c9e7013668d99bd075b186db86cb65ddeb
Author: Mark Lawrence <nomad@null.net> Sat, 02 Jun 2007 18:04:18 +0200
Table and Column classes can produce CREATE TABLE statements.
SELECT statements are broken due to new Table/Column classes.
Commit: 6dddb63569b272f4dc79f490c09af7d6b0eb31fc
Author: Mark Lawrence <nomad@null.net> Fri, 01 Jun 2007 22:29:13 +0200
Support for SELECT statements (incomplete)
First test program (test.pl)
Commit: 7e447fb263acc1c747acb36c0e7a1f37f3f68cb0
Author: Mark Lawrence <nomad@null.net> Fri, 01 Jun 2007 15:38:46 +0200
Initial Commit.