Skip to content

Commit

Permalink
Corrijo fixture
Browse files Browse the repository at this point in the history
  • Loading branch information
diegoefe committed Dec 12, 2016
1 parent a080b58 commit 74583c4
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 14 deletions.
10 changes: 5 additions & 5 deletions lib/txt-to-sql.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ function filling(columnLength, val) { return val.length>=columnLength?'':new Arr
function padLeft(columnLength, val) { return val+filling(columnLength, val); }
function padRight(columnLength, val) { return filling(columnLength,val)+val; }

function isBoolean(values) {
return values.every(function(val) {
return val.match(/^[yntf01]$/i);
});
}
// function isBoolean(values) {
// return values.every(function(val) {
// return val.match(/^[yntf01]$/i);
// });
// }
function isInteger(values) {
return values.every(function(val) {
return val.match(/^-?[0-9]{1,5}$/);
Expand Down
2 changes: 1 addition & 1 deletion test/fixtures/timestamps.result.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ columns:
- name: ts1
type: timestamp
inPrimaryKey: true
maxLength: 10
maxLength: 25
maxScale: 0
hasNullValues: false
hasCientificNotation: null
Expand Down
4 changes: 2 additions & 2 deletions test/fixtures/timestamps.sql
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
create table "timestamps" (
"ts1" date,
"ts1" timestamp,
"fecha" date,
primary key ("ts1")
);

insert into "timestamps" ("ts1", "fecha") values
('2016-11-21 10:00:01', '2/2/1969'),
('2010-01-21 00:10:00', '20/3/1969'),
('2010-01-21 00:10:00.009', '20/3/1969'),
('1969-05-06 00:10:00 -3:00', null);
2 changes: 1 addition & 1 deletion test/fixtures/timestamps.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ts1;fecha
2016-11-21 10:00:01;2/2/1969
2010-01-21 00:10:00;20/3/1969
2010-01-21 00:10:00.009;20/3/1969
1969-05-06 00:10:00 -3:00;
10 changes: 5 additions & 5 deletions web/txt-to-sql.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ function filling(columnLength, val) { return val.length>=columnLength?'':new Arr
function padLeft(columnLength, val) { return val+filling(columnLength, val); }
function padRight(columnLength, val) { return filling(columnLength,val)+val; }

function isBoolean(values) {
return values.every(function(val) {
return val.match(/^[yntf01]$/i);
});
}
// function isBoolean(values) {
// return values.every(function(val) {
// return val.match(/^[yntf01]$/i);
// });
// }
function isInteger(values) {
return values.every(function(val) {
return val.match(/^-?[0-9]{1,5}$/);
Expand Down

0 comments on commit 74583c4

Please sign in to comment.