[ruby-gnome2-doc-cvs] [Hiki] update - tut-libgda-build-queries

Back to archive index

ruby-****@sourc***** ruby-****@sourc*****
2004年 4月 1日 (木) 20:33:01 JST


-------------------------
REMOTE_ADDR = 195.207.101.112
REMOTE_HOST = 
        URL = http://ruby-gnome2.sourceforge.jp/en/?tut-libgda-build-queries
-------------------------
  = Building commands
+ {{link("tut-libgda-connect", nil, "tut-libgda", "tut-libgda-exec-queries")}}
  
  Before invoking a query you have to build the object containing the command and you can do this with Gda::Command.new.
  
    Gda::Command.new(text, command_type, options)
  
  Possible command_type are:
  
    Gda::Command::TYPE_SQL
    Gda::Command::TYPE_XML
    Gda::Command::TYPE_PROCEDURE
    Gda::Command::TYPE_TABLE
    Gda::Command::TYPE_SCHEMA
  
  The command type we most commonly use is Gda::Command::TYPE_SQL because we will only focus on SQL queries.
  
  Possible options are:
  
    # Ignores all errors and executes all sentences returning data models. 
    # For failed sentences, it returns an empty data model.
    Gda::Command::OPTION_IGNORE_ERRORS
  
    # Stops when finding and error and doesn't return data models.
    Gda::Command::OPTION_STOP_ON_ERRORS
  
  Here you see an example of creating a command:
  
    # text contains one or several (comma-separated) SQL commands.
    command = Gda::Command.new(text, Gda::Command::TYPE_SQL, Gda::Command::OPTION_STOP_ON_ERRORS)





ruby-gnome2-cvs メーリングリストの案内
Back to archive index