[TxMt] snippets for MySQL; escaping "`"?

Paul Nordstrom August paul at archivistes.com
Tue Nov 9 14:45:28 UTC 2004


I'm about to embark on a lengthy and complex project (changing 30-odd 
FileMaker tables into MySQL). Usually I use the (excellent) CocoaMySQL 
for table creation but I thought I'd explore using snippets in TM...

Basically it works like a charm (create table, add date field, add 
varchar, add int...), though I haven't tested it vs CocoaMySQL to see 
which will be faster (as CMS offers more tweaking of the field 
definitions). But I figure I can whack out the fields in TM then import 
the whole .sql file into CMS for the tweaking, adding indexes, etc.

> CREATE TABLE textmate (
>   textmate_id int(11) NOT NULL auto_increment,
>   tm_user varchar(50) default NULL,
>   user_no int(5) default NULL,
>   user_email varchar(50) default NULL,
>   entry_date date default NULL,
>   PRIMARY KEY (textmate_id)
> ) ENGINE=InnoDB;

The one thing I can't manage to sort out is including e.g. 
"`textmate_id`" since the "`" is used in the snippets to evoke a shell 
command... I tried escaping with "\`" but that didn't work. Am I 
missing something obvious?

In any case, it's clear that snippets can revolutionize coding :) Wish 
I had more time to explore... embedding shell commands could be 
fantastic...

Paul




More information about the textmate mailing list