emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[patch] SQL enhancements


From: Michael Mauger
Subject: [patch] SQL enhancements
Date: Thu, 15 Apr 2010 21:14:40 -0700 (PDT)

Since my employer has decided that they no longer need my services, I've got 
time to dedicate to Emacs!

Attached is an accumulation of changes I've made to sql.el over the last couple 
of years.  It includes more code reuse and an API for defining and accessing 
product specific features.  I've got more code after this which uses the API 
but I want to look into integrating it with some of the IDE features added in 
Emacs 23.

Looking for feedback on code style and quality.

NEWS entry
=========

** SQL enhancements.

*** Several variables have been marked as safe local variables.

*** Added option `sql-send-terminator'.

*** Added option `sql-oracle-scan-on'.

*** SQL interactive mode will replace tabs with spaces.
This prevents the comand interpretter for MySQL and Postgres from
listing object name completions when being sent text via
`sql-send-' functions.

*** An API for manipulating SQL product definitions has been added.


ChangeLog entry
============

2010-04-15  Michael R. Mauger  <address@hidden>

    * progmodes/sql.el: Version 2.1
    (sql-product-alist): Redesigned structure of product info.
    (sql-interactive-product): New variable.
    (sql-send-terminator): New variable.
    (sql-imenu-generic-expression): Added "Types" imenu entry.
    (sql-oracle-login-params, sql-sqlite-login-params)
    (sql-mysql-login-params, sql-solid-login-params)
    (sql-sybase-login-params, sql-informix-login-params)
    (sql-ingres-login-params, sql-ms-login-params)
    (sql-postgres-login-params, sql-interbase-login-params)
    (sql-db2-login-params, sql-linter-login-params)
    (sql-oracle-scan-on): New variables.
    (sql-port, sql-port-history): New variables.
    (sql-mode-map): Added C-c C-z to start interactive mode.
    (sql-mode-menu): Updated existing menu entries.
    (sql-mode-oracle-font-lock-keywords)
    (sql-mode-postgres-font-lock-keywords)
    (sql-mode-ms-font-lock-keywords)
    (sql-mode-sybase-font-lock-keywords)
    (sql-mode-informix-font-lock-keywords)
    (sql-mode-interbase-font-lock-keywords)
    (sql-mode-ingres-font-lock-keywords)
    (sql-mode-solid-font-lock-keywords)
    (sql-mode-mysql-font-lock-keywords)
    (sql-mode-sqlite-font-lock-keywords)
    (sql-mode-db2-font-lock-keywords)
    (sql-mode-linter-font-lock-keywords): Updated initialization to
    reduce run-time complexity.
    (sql-add-product, sql-del-product): New functions.
    (sql-set-product-feature, sql-get-product-feature): New functions.
    (sql-product-font-lock): Update product API.
    (sql-add-product-keywords): New function.
    (sql-highlight-product): Update product API.
    (sql-help-list-products): New function.
    (sql-help): Dynamically lists free and non-free products.
    (sql-get-login): Corrected bug in handling history and added
    prompt for port.
    (sqli-buffer): Renamed from `sql-buffer'.
    (sql-set-sqli-buffer-generally, sql-set-sqli-buffer): Updated
    use of `sqli-buffer'.
    (sql-copy-column): Copy without properties.
    (sqli-input-sender): Apply filters to SQLi input.
    (sql-query-placeholders-and-send): Obey `sql-oracle-scan-on'
    setting.  Implement as a filter.
    (sql-escape-newlines-filter): Implement as a filter.
    (sql-remove-tabs-filter): New function.
    (sql-send-magic-terminator): New function.
    (sql-send-string): Implement magic terminator.
    (sql-send-region): Use `sql-send-string'.
    (sql-mode): Use `sqli-buffer'.
    (sql-interactive-mode): Use product API.
    (sql-product-interactive): Use product API.
    (sql-oracle, sql-sybase, sql-informix, sql-sqlite, sql-mysql)
    (sql-solid, sql-ingres, sql-ms, sql-postgres, sql-interbase)
    (sql-db2, sql-linter): Use `sql-product-interactive'.
    (sql-connect): New function.
    (sql-connect-oracle, sql-connect-sybase, sql-connect-informix)
    (sql-connect-sqlite, sql-connect-mysql, sql-connect-solid)
    (sql-connect-ingres, sql-connect-ms, sql-connect-postgres)
    (sql-connect-interbase, sql-connect-db2, sql-connect-linter): Use
    `sql-connect'.

Attachment: sql.diff
Description: Binary data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]