README.rdoc in swift-0.7.2 vs README.rdoc in swift-0.8.0
- old
+ new
@@ -8,27 +8,19 @@
== Dependencies
* ruby >= 1.9.1
* dbic++ >= 0.4.0 (http://github.com/deepfryed/dbicpp)
-* mysql >= 5.0.17 or postgresql >= 8.4 or db2 >= 9.7.2
+* mysql >= 5.0.17, postgresql >= 8.4 or sqlite3 >= 3.7
-== Caveats
-
-=== DB2
-* The server needs to be running under DB2_COMPATIBILITY_VECTOR=77FF if you want to use the ORM
- features of swift.
-* DB2 asynchronous operations are highly experimental at this point due to inherent limitations of the
- underlying api. It is more an academic exercise and is not ready for real-world use.
-
== Features
* Multiple databases.
* Prepared statements.
* Bind values.
* Transactions and named save points.
-* EventMachine asynchronous interface.
+* EventMachine asynchronous interface (mysql and postgresql).
* IdentityMap.
* Migrations.
== Synopsis
@@ -173,11 +165,11 @@
User.first(':name = ?', 'James Arthurton')
User.first(':name = ?', 'James Arthurton') # Gets same object reference
=== Bulk inserts
-Swift comes with adapter level support for bulk inserts for MySQL, PostgreSQL and DB2. This
+Swift comes with adapter level support for bulk inserts for MySQL and PostgreSQL. This
is usually very fast (~5-10x faster) than regular prepared insert statements for larger
sets of data.
MySQL adapter - Overrides the MySQL C API and implements its own _infile_ handlers. This
means currently you *cannot* execute the following SQL using Swift
@@ -223,29 +215,29 @@
the actual memory consumption might be much lower than the numbers below.
./simple.rb -n1 -r10000 -s ar -s dm -s sequel -s swift
- benchmark sys user total real rss
- ar #create 0.800000 6.620000 7.420000 9.898821 369.44m
- ar #select 0.020000 0.300000 0.320000 0.372809 38.83m
- ar #update 0.770000 6.550000 7.320000 10.02434 361.92m
+ benchmark sys user total real rss
+ ar #create 0.790000 8.290000 9.08000 11.679886 405.07m
+ ar #select 0.040000 0.310000 0.35000 0.383573 40.56m
+ ar #update 0.720000 9.890000 10.6100 13.765735 503.48m
- dm #create 0.110000 3.590000 3.700000 4.847609 248.74m
- dm #select 0.120000 1.840000 1.960000 2.029552 128.98m
- dm #update 0.400000 7.750000 8.150000 9.741249 599.52m
+ dm #create 0.310000 3.300000 3.61000 4.593075 211.01m
+ dm #select 0.040000 1.720000 1.76000 1.776852 114.51m
+ dm #update 0.450000 7.600000 8.05000 9.610320 531.26m
- sequel #create 0.770000 3.910000 4.680000 7.432611 263.59m
- sequel #select 0.020000 0.080000 0.100000 0.147321 9.82m
- sequel #update 0.730000 3.910000 4.640000 7.594949 259.18m
+ sequel #create 0.670000 4.670000 5.34000 7.991811 235.39m
+ sequel #select 0.000000 0.130000 0.13000 0.178447 12.76m
+ sequel #update 0.790000 4.540000 5.33000 7.854936 229.70m
- swift #create 0.210000 0.850000 1.060000 2.618661 32.72m
- swift #select 0.000000 0.080000 0.080000 0.132245 9.91m
- swift #update 0.270000 0.650000 0.920000 2.204108 37.48m
+ swift #create 0.100000 0.710000 0.81000 1.562289 85.84m
+ swift #select 0.000000 0.120000 0.12000 0.145567 8.96m
+ swift #update 0.190000 0.690000 0.88000 1.628918 59.50m
-- bulk insert api --
- swift #write 0.000000 0.080000 0.080000 0.151146 7.29m
+ swift #write 0.010000 0.100000 0.11000 0.180514 14.80m
==== Adapter
The adapter level SELECT benchmarks without using ORM.
@@ -256,27 +248,30 @@
for pg gem and also makes the benchmarks more fair.
===== PostgreSQL
benchmark sys user total real rss
- do #select 0.060000 1.070000 1.130000 1.370092 99.83m
- pg #select 0.030000 0.270000 0.300000 0.584091 46.13m
- swift #select 0.020000 0.290000 0.310000 0.571635 39.08m
+ do #select 0.020000 1.250000 1.270000 1.441281 71.98m
+ pg #select 0.000000 0.580000 0.580000 0.769186 42.93m
+ swift #select 0.040000 0.510000 0.550000 0.627581 43.23m
===== MySQL
benchmark sys user total real rss
- do #select 0.030000 1.070000 1.100000 1.200177 99.26m
- mysql2 #select 0.060000 0.450000 0.510000 0.609236 76.44m
- swift #select 0.050000 0.170000 0.220000 0.334932 33.61m
+ do #select 0.030000 1.130000 1.160000 1.172205 71.86m
+ mysql2 #select 0.040000 0.660000 0.700000 0.704414 72.72m
+ swift #select 0.010000 0.480000 0.490000 0.499643 42.03m
== TODO
* More tests.
-* Make db2 async api more stable.
* Assertions for dumb stuff.
* Abstract interface for other adapters? Move dbic++ to Swift::DBI::(Adapter, Pool, Result, Statment etc.)
== Contributing
Go nuts! There is no style guide and I do not care if you write tests or comment code. If you write something neat just
send a pull request, tweet, email or yell it at me line by line in person.
+
+== Feature suggestions and support
+
+{Suggest features and support Swift ORM on fundry.}[https://fundry.com/project/14-swift-orm]