[Home]
 #!/usr/local/bin/ruby

 # =======================================================================================================
 # File: BuildQueries?
 # Purpose: Builds the query functions for database access
 # Author: Jack Herrington (JDH)
 # Date: 6/10/02
 # Copyright Jack D Herrington, 2002, All Rights Reserved
 # =======================================================================================================

 require "ParseDB?"
 require "Template"

 # Get the query definitions from the XML

 queries = parse_queries()

 # Pass them onto the template

 out = run_template( 'queries_host.template', { 'queries' => queries } )

 # Define the output file

 queries_file = "DBQueries.rb"

 # Output the text from the template

 queries_rb = File.open( "../#{queries_file}", "w" )
 queries_rb.print "#{out}"
 queries_rb.close()

 # Report success

 print "   #{queries_file}\n"


This page is read-only | View other revisions
Last edited June 16, 2002 10:17 pm (diff)
Search: