From rklinda at gmail.com Sat Jan 2 19:14:42 2010 From: rklinda at gmail.com (Richard KLINDA) Date: Sat, 02 Jan 2010 20:14:42 +0100 Subject: [postmodern-devel] creating a function based index Message-ID: <87aawwjp3x.fsf@gmail.com> Hello, is there syntax available for creating function based indexes? How can I write this in s-sql? ,---- | CREATE INDEX my_index ON my_table (LOWER(my_column)) `---- I tried ,---- | (sql (:create-index :my-index :on :my-table :fields (:lower :my-column))) | | => (:LOWER :TERM) cannot be coerced to a string. | [Condition of type SIMPLE-TYPE-ERROR] `---- Thanks in advance, Richard From marijnh at gmail.com Mon Jan 4 17:26:51 2010 From: marijnh at gmail.com (Marijn Haverbeke) Date: Mon, 4 Jan 2010 18:26:51 +0100 Subject: [postmodern-devel] creating a function based index In-Reply-To: <87aawwjp3x.fsf@gmail.com> References: <87aawwjp3x.fsf@gmail.com> Message-ID: Hi Richard, I wasn't aware one could create indices on the results of a function. I've pushed a hack to the darcs repository that makes your example possible: (sql (:create-index :my-index :on :my-table :fields (:lower :my-column))) => "CREATE INDEX my_index ON my_table (lower(my_column))" Best, Marijn From daniel at whitehouse.id.au Sat Jan 23 15:34:10 2010 From: daniel at whitehouse.id.au (Daniel White) Date: Sun, 24 Jan 2010 02:34:10 +1100 Subject: [postmodern-devel] Add :between-symmetric operator Message-ID: For example: (:select '* :from 'table :where (:between-symmetric 'column 10 1)) -- Daniel White -------------- next part -------------- A non-text attachment was scrubbed... Name: add-_between_symmetric-operator.dpatch Type: application/octet-stream Size: 30309 bytes Desc: not available URL: From marijnh at gmail.com Sat Jan 23 19:25:30 2010 From: marijnh at gmail.com (Marijn Haverbeke) Date: Sat, 23 Jan 2010 20:25:30 +0100 Subject: [postmodern-devel] Add :between-symmetric operator In-Reply-To: References: Message-ID: Wonderful. Patches like that make a maintainer's life easy. Pushed.