search for: adrianopol

Displaying 2 results from an estimated 2 matches for "adrianopol".

2009 Sep 07
11
autoincrement for non-id column
There is a table: execute (<<-SQL) CREATE TABLE "tasks" ( "id" serial primary key, "number" serial, "version" integer DEFAULT 0 NOT NULL, "latest_version" boolean DEFAULT ''t'' NOT NULL, "hidden" boolean DEFAULT ''f'' NOT NULL, "type" character varying (1) NOT
2009 Sep 04
3
libxml-ruby: How to handle XML::Parser::ParseError?
Code: require "rubygems" require "xml" class TaskLoader class BadXML < RuntimeError end def load_tasks doc = XML::Parser.file( "qq.xml" ).parse # ... work with document ... rescue XML::Parser::ParseError, BadXML # this is line #40 # ... end end # TaskLoader p TaskLoader.new.load_tasks # this is line #71 Output: read_xml.rb:40:in