com.taosdata.jdbc

## Class SchemalessWriter

- java.lang.Object
- - com.taosdata.jdbc.SchemalessWriter

    public class SchemalessWriter
    extends Object

This class is for schemaless lines(line/telnet/json) write to tdengine. e.g.: SchemalessWriter writer = new SchemalessWriter(connection); writer.write(lines, SchemalessProtocolType, SchemalessTimestampType);

### Field Summary

Fields
`protected Connection` `connection`

### Constructor Summary

Constructors
Constructor and Description
`SchemalessWriter(Connection connection)`

### Method Summary

All Methods Instance Methods Concrete Methods
`void` `write(List<String> lines, SchemalessProtocolType protocolType, SchemalessTimestampType timestampType)` batch schemaless lines write to db with list
`void` `write(String[] lines, SchemalessProtocolType protocolType, SchemalessTimestampType timestampType)` batch schemaless lines write to db
`void` `write(String line, SchemalessProtocolType protocolType, SchemalessTimestampType timestampType)` only one line writes to db

### Methods inherited from class java.lang.Object

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

### Field Detail

#### connection

    protected Connection connection

### Constructor Detail

#### SchemalessWriter

    public SchemalessWriter(Connection connection)

### Method Detail

#### write

    public void write(String[] lines,
                      SchemalessProtocolType protocolType,
                      SchemalessTimestampType timestampType)
               throws SQLException

batch schemaless lines write to db

Parameters:
  `lines` - schemaless lines
  `protocolType` - schemaless type `SchemalessProtocolType`
  `timestampType` - Time precision `SchemalessTimestampType`
Throws:
  `SQLException` - execute exception

#### write

    public void write(String line,
                      SchemalessProtocolType protocolType,
                      SchemalessTimestampType timestampType)
               throws SQLException

only one line writes to db

Parameters:
  `line` - schemaless line
  `protocolType` - schemaless type `SchemalessProtocolType`
  `timestampType` - Time precision `SchemalessTimestampType`
Throws:
  `SQLException` - execute exception

#### write

    public void write(List<String> lines,
                      SchemalessProtocolType protocolType,
                      SchemalessTimestampType timestampType)
               throws SQLException

batch schemaless lines write to db with list

Parameters:
  `lines` - schemaless list
  `protocolType` - schemaless type `SchemalessProtocolType`
  `timestampType` - Time precision `SchemalessTimestampType`
Throws:
  `SQLException` - execute exception