<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ Copyright (c) DbVis Software AB. All Rights Reserved.
  -->

<DbVisualizer>
   <Templates>
      <ImmediateSubstitution>true</ImmediateSubstitution>
      <Template shortcut=".sf" default="true" format="true">
         <Description />
         <Text><![CDATA[select * from myTable where myColumns]]></Text>
      </Template>
      <Template shortcut=".sc" default="true" format="true">
         <Description />
         <Text><![CDATA[select count(*) from myTable where myColumns]]></Text>
      </Template>
      <Template shortcut=".df" default="true" format="true">
         <Description />
         <Text><![CDATA[delete from myTable where myColumns]]></Text>
      </Template>
      <Template shortcut=".ii" default="true" format="true">
         <Description />
         <Text><![CDATA[insert into myTable (myColumns) values (myValues);]]></Text>
      </Template>
      <Template shortcut=".date" default="true">
         <Description>Today's date</Description>
         <Text><![CDATA[${dbvis-date}$]]></Text>
      </Template>
      <Template shortcut=".fdate" default="true">
         <Description>Today's date, formatted</Description>
         <Text><![CDATA[${dbvis-date||||||format=[dd-MMM-yyyy]}$]]></Text>
      </Template>
      <Template shortcut=".ts" default="true">
         <Description>Current timestamp</Description>
         <Text><![CDATA[${dbvis-timestamp}$]]></Text>
      </Template>
      <Template shortcut=".time" default="true">
         <Description>Current time</Description>
         <Text><![CDATA[${dbvis-time}$]]></Text>
      </Template>
      <Template shortcut=".exc" default="true">
         <Description>@export to CSV template</Description>
         <Text><![CDATA[@export on;
@export set Filename="name.csv" Format="csv";
select * from myTable;
@export off;]]></Text>
      </Template>
      <Template shortcut=".exs" default="true">
         <Description>@export to SQL template</Description>
         <Text><![CDATA[@export on;
@export set Filename="name.sql" Format="sql";
select * from myTable;
@export off;]]></Text>
      </Template>
      <Template shortcut=".exh" default="true">
         <Description>@export to HTML template</Description>
         <Text><![CDATA[@export on;
@export set Filename="name.html" Format="html";
@export set HtmlTitle="Title";
select * from myTable;
@export off;]]></Text>
      </Template>
      <Template shortcut=".exxls" default="true">
         <Description>@export to Excel 2007 template</Description>
         <Text><![CDATA[@export on;
@export set Filename="name.xlsx" Format="excel" ExcelFileFormat="xlsx";
@export set ExcelTitle="Title";
select * from myTable;
@export off;]]></Text>
      </Template>
      <Template shortcut=".imp" default="true">
         <Description>@import a CSV file</Description>
         <Text><![CDATA[@import on;
@import set ImportSource="fruits.csv";
@import parse;
@import target Table="fruits";
@import execute;
@import off;]]></Text>
      </Template>

      <Template shortcut=".impmap" default="true">
         <Description>@import a CSV file mapping source columns to target columns</Description>
         <Text><![CDATA[@import on;
@import set ImportSource="fruits.csv";
@import parse;
@import target Table="fruits" ColumnMapping="0=name, 1=fruitcolor";
@import execute;
@import off;]]></Text>
      </Template>
      <Template shortcut=".imptxt" default="true">
         <Description>@import a text file using fixed columns. (Columns starting on index 0 and 6) </Description>
         <Text><![CDATA[@import on;
@import set ImportSource="fruits.txt" TxtColumns="0, 11";
@import parse;
@import target Table="fruits";
@import execute;
@import off;]]></Text>
      </Template>
      <Template shortcut=".mail" default="true">
         <Description>@mail using Mail Server Account</Description>
         <Text><![CDATA[@mail
To="<recipient>"
Subject="<subject>"
Body="<body>"
MailServerAccount="Gmail";]]></Text>
      </Template>
      <Template shortcut=".mailx" default="true">
         <Description>@mail with parameters defining account</Description>
         <Text><![CDATA[@mail
To="<recipient>"
Subject="<subject>"
Body="<body>"
MailServerHost="smtp.gmail.com"
MailServerPort="587"
MailServerUser="<userid>"
MailServerPassword="<password>";]]></Text>
      </Template>
      <Template shortcut=".(c)" default="true">
         <Description>Copyright</Description>
         <Text><![CDATA[©]]></Text>
      </Template>
      <Template shortcut=".(tm)" default="true">
         <Description>Trademark</Description>
         <Text><![CDATA[(™)]]></Text>
      </Template>
   </Templates>
</DbVisualizer>
