From ee5d78a92396b1b91458b561fd54564fc14c4dd0 Mon Sep 17 00:00:00 2001 From: ygrek Date: Sun, 21 Jun 2009 16:22:21 +0300 Subject: [PATCH] minor --- main.ml | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/main.ml b/main.ml index c57ab13..45f42aa 100644 --- a/main.ml +++ b/main.ml @@ -23,6 +23,10 @@ let parse_one (stmt,props) = try (* print_endline stmt; *) let (s,p,k) = Parser.parse_stmt stmt in + if not (RA.Schema.is_unique s) then + begin + Error.log "Error: this SQL statement will produce rowset with duplicate column names:\n%s\n" stmt + end; Some {Stmt.schema=s; params=p; kind=k; props=Props.set props "sql" stmt} with | exn -> @@ -40,12 +44,7 @@ let get_statements ch = | Some sql -> begin match parse_one sql with | None -> next () - | Some stmt -> - if not (RA.Schema.is_unique stmt.Stmt.schema) then - begin - Error.log "Warning: this SQL statement will produce rowset with duplicate column names:\n%s\n" (fst sql) - end; - stmt + | Some stmt -> stmt end in Enum.from next -- 2.11.4.GIT