# Class WriteMode

java.lang.Object
uk.ac.starlink.table.jdbc.WriteMode

public class WriteMode extends Object
Defines how records are written to a database table.

Since:
  11 Dec 2007
Author:
  Mark Taylor

## Field Summary

Fields
Modifier and Type
Field
Description
`static final WriteMode`
`APPEND`
WriteMode which appends to an existing table.
`static final WriteMode`
`CREATE`
WriteMode which creates a new database table before writing.
`static final WriteMode`
`DROP_CREATE`
WriteMode which creates a new database table before writing.

## Method Summary

Modifier and Type
Method
Description
`static WriteMode[]`
`getAllModes()`
Returns an array of all known write modes.
`String`
`getDescription()`
Returns a short description of this mode's operation.
`String`
`toString()`
Returns this mode's name.

### Methods inherited from class Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

## Field Details

### CREATE

public static final WriteMode CREATE
WriteMode which creates a new database table before writing. It is an error if a table of the same name already exists.

### DROP_CREATE

public static final WriteMode DROP_CREATE
WriteMode which creates a new database table before writing. If a table of the same name already exists, it is dropped first.

### APPEND

public static final WriteMode APPEND
WriteMode which appends to an existing table. An error results if the named table has the wrong structure for the data being written.

## Method Details

### getDescription

public String getDescription()
Returns a short description of this mode's operation.

Returns:
  description

### toString

public String toString()
Returns this mode's name.

Overrides:
  `toString` in class `Object`

### getAllModes

public static WriteMode[] getAllModes()
Returns an array of all known write modes.

Returns:
  write mode array