Skip to content

How to create a new SQL command

MasterDuke17 edited this page Sep 7, 2019 · 2 revisions

Using drop table as example:

  • create a new Red::AST::DropTable
  • create a .^drop-table method on MetamodelX::Red::Model (like the .^create-table method)
  • add a multi method translate(Red::AST::DropTable $_, $context) on Red::Driver::CommonSQL
  • if is there any supported database where the SQL for drop a table is different from the CommonSQL one, add a multi method translate(Red::AST::DropTable $_, $context) on that driver
Clone this wiki locally