1acd88a8abfcb751137de110c1c41edbbc1eda8e
[clsql.git] / classic / usql.lisp
1 ;;;; -*- Mode: LISP; Syntax: ANSI-Common-Lisp; Base: 10 -*-
2 ;;;; *************************************************************************
3 ;;;; FILE IDENTIFICATION
4 ;;;;
5 ;;;; Name:          usql.lisp
6 ;;;; Purpose:       High-level interface to SQL driver routines needed for
7 ;;;;                UncommonSQL
8 ;;;; Programmers:   Kevin M. Rosenberg and onShore Development Inc
9 ;;;; Date Started:  Mar 2002
10 ;;;;
11 ;;;; $Id$
12 ;;;;
13 ;;;; This file, part of CLSQL, is Copyright (c) 2002-2004 by Kevin M. Rosenberg
14 ;;;; and onShore Development Inc
15 ;;;;
16 ;;;; CLSQL users are granted the rights to distribute and use this software
17 ;;;; as governed by the terms of the Lisp Lesser GNU Public License
18 ;;;; (http://opensource.franz.com/preamble.html), also known as the LLGPL.
19 ;;;; *************************************************************************
20
21
22 ;;; Minimal high-level routines to enable low-level interface for USQL
23 ;;; Thse functions are not exported. If you application depends on these
24 ;;; consider using the clsql-usql package.
25
26
27 (in-package #:clsql-sys)
28
29 (defun list-tables (&key (database *default-database*))
30   "List all tables in *default-database*, or if the :database keyword arg
31 is given, the specified database.  If the keyword arg :system-tables
32 is true, then it will not filter out non-user tables.  Table names are
33 given back as a list of strings."
34   (database-list-tables database))
35
36
37 (defun list-attributes (table &key (database *default-database*))
38   "List the attributes of TABLE in *default-database, or if the
39 :database keyword is given, the specified database.  Attributes are
40 returned as a list of strings."
41   (database-list-attributes table database))
42
43 (defun attribute-type (attribute table &key (database *default-database*))
44   "Return the field type of the ATTRIBUTE in TABLE.  The optional
45 keyword argument :database specifies the database to query, defaulting
46 to *default-database*."
47   (database-attribute-type attribute table database))
48
49 (defun create-sequence (name &key (database *default-database*))
50   (database-create-sequence name database))
51
52 (defun drop-sequence (name &key (database *default-database*))
53   (database-drop-sequence name database))
54
55 (defun sequence-next (name &key (database *default-database*))
56   (database-sequence-next name database))
57
58