/[simile]/sql/mt.sql
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Annotation of /sql/mt.sql

Parent Directory Parent Directory | Revision Log Revision Log


Revision 34 - (hide annotations)
Sat Oct 25 12:47:24 2008 UTC (15 years, 5 months ago) by dpavlin
File size: 551 byte(s)
encode property valueType for Exhibit in column name

Original idea was to get it directly from DBI, but that
didn't turn out to work well, so we extend column name
in SQL query with valueType and name of type
1 dpavlin 33 \c blogs
2     -- Movable Type
3    
4     select
5     entry_atom_id as id,
6     'http://blog.rot13.org/' || date_part('year', entry_authored_on) || '/' || lpad(date_part('month', entry_authored_on)::text,2,'0') || '/' || entry_basename || '.html' as uri,
7     entry_title as label,
8     entry_authored_on as date,
9     entry_modified_on as modified,
10     author_email as author,
11     entry_text as content,
12     date_part('year', entry_authored_on) as year,
13 dpavlin 34 length(entry_text) as length_valueType_number
14 dpavlin 33 from mt_entry
15     join mt_author on entry_author_id = author_id
16     order by entry_authored_on desc
17     ;

  ViewVC Help
Powered by ViewVC 1.1.26