Comparing version 1.2.20 to 1.2.21
@@ -5,4 +5,5 @@ if (typeof exports != "undefined") { | ||
SqliteDatabase = function(db,Fiber) { | ||
SqliteDatabase = function(db,fname,Fiber) { | ||
this.db = db; | ||
this.fname = fname; | ||
this.row = null; | ||
@@ -13,2 +14,6 @@ this.active = false; | ||
} | ||
SqliteDatabase.prototype.getHelper = function() { | ||
return new daff.SqliteHelper(); | ||
} | ||
@@ -20,3 +25,3 @@ SqliteDatabase.prototype.getQuotedColumnName = function (name) { | ||
SqliteDatabase.prototype.getQuotedTableName = function (name) { | ||
return name; | ||
return name.toString(); | ||
} | ||
@@ -32,3 +37,9 @@ | ||
var x = rows[i]; | ||
lst.push(new daff.SqlColumn.byNameAndPrimaryKey(x['name'],x['pk']>0)); | ||
var col = new daff.SqlColumn(); | ||
col.setName(x['name']); | ||
col.setPrimaryKey(x['pk']>0); | ||
if (x['type']) { | ||
col.setType(x['type'],'sqlite'); | ||
} | ||
lst.push(col); | ||
self.index2name[i] = x['name']; | ||
@@ -75,4 +86,3 @@ } | ||
this.db.each(query,(args==null)?[]:args,function(err,row) { | ||
if (err) { | ||
console.log(err); | ||
if (err) { | ||
fiber.run([false,0]); | ||
@@ -83,2 +93,5 @@ } else { | ||
},function(err,n) { | ||
if (err) { | ||
console.log(err); | ||
} | ||
fiber.run([false,n]); | ||
@@ -115,2 +128,6 @@ }); | ||
SqliteDatabase.prototype.getNameForAttachment = function() { | ||
return this.fname; | ||
} | ||
exports.SqliteDatabase = SqliteDatabase; | ||
@@ -117,0 +134,0 @@ |
@@ -67,3 +67,3 @@ if (typeof exports != "undefined") { | ||
if (Fiber) { | ||
return new SqliteDatabase(new sqlite3.Database(path),Fiber); | ||
return new coopy.SqliteDatabase(new sqlite3.Database(path),path,Fiber); | ||
} | ||
@@ -194,3 +194,2 @@ throw("run inside Fiber plz"); | ||
exports.run_daff_main(); | ||
console.log("ok"); | ||
}).run(); | ||
@@ -197,0 +196,0 @@ } else { |
{ | ||
"name": "daff", | ||
"version": "1.2.20", | ||
"version": "1.2.21", | ||
"description": "Diff and patch tables", | ||
@@ -5,0 +5,0 @@ "url": "https://github.com/paulfitz/daff", |
@@ -87,3 +87,3 @@ [![Build Status](https://travis-ci.org/paulfitz/daff.svg?branch=master)](https://travis-ci.org/paulfitz/daff) | ||
![Example CSV diff](scripts/diff.png) | ||
![Example CSV diff](http://paulfitz.github.io/daff-doc/images/daff_vs_diff.png) | ||
@@ -185,3 +185,2 @@ The library | ||
Supported languages | ||
@@ -203,6 +202,6 @@ ------------------- | ||
[Releases](https://github.com/paulfitz/daff/releases) page. | ||
To make another translation, | ||
follow the | ||
[Haxe getting started tutorial](http://haxe.org/doc/start) for the | ||
language you care about, then do one of: | ||
To make another translation, or to compile from source | ||
first follow the [Haxe getting started tutorial](http://haxe.org/doc/start) for the | ||
language you care about. At the time of writing, if you are on OSX, you should | ||
install haxe using `brew install haxe --HEAD`. Then do one of: | ||
@@ -209,0 +208,0 @@ ``` |
@@ -24,4 +24,5 @@ var assert = require('assert'); | ||
if (a==null) { | ||
assert(align.b2a(b)==null,msg); | ||
assert(align.b2a(b)==-1,msg); | ||
} else { | ||
if (b==null) b = -1; | ||
assert(align.a2b(a)==b,msg); | ||
@@ -28,0 +29,0 @@ } |
@@ -51,6 +51,6 @@ var coopy = require('daff'); | ||
[3,4,4], | ||
[-1,-1,5], | ||
[4,2,2]]); | ||
[4,2,2], | ||
[-1,-1,5]]); | ||
tester.order_asserts(align.meta.toOrder(), | ||
[[0,0,0]]); | ||
} |
@@ -67,3 +67,3 @@ var coopy = require('daff'); | ||
tester.order_asserts(align.meta.toOrder(), | ||
[[2,0],[0,1],[1,-1]]); | ||
[[1,-1],[2,0],[0,1]]); | ||
tester.order_asserts(align.toOrder(), | ||
@@ -70,0 +70,0 @@ [[0,0],[1,1],[2,2],[-1,3],[3,-1]]); |
@@ -125,1 +125,3 @@ var fs = require('fs'); | ||
@@ -18,3 +18,3 @@ var fs = require('fs'); | ||
Fiber(function() { | ||
var sql = new SqliteDatabase(new sqlite3.Database(':memory:'),Fiber); | ||
var sql = new SqliteDatabase(new sqlite3.Database(':memory:'),null,Fiber); | ||
sql.exec("CREATE TABLE ver1 (id INTEGER PRIMARY KEY, name TEXT)"); | ||
@@ -21,0 +21,0 @@ sql.exec("CREATE TABLE ver2 (id INTEGER PRIMARY KEY, name TEXT)"); |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
919318
147
16867