sql_dialect: Define an SQL dialect

Description Usage Arguments Format Value See Also

View source: R/sql_dialect.R

Description

SQL dialects are used to configure a dbj connection

A generator function for a generic CREATE TABLE statment

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
generic_create_statement_generator(table_name, field_names, field_types,
  temporary)


  create_table_template(statement_generator = generic_create_statement_generator)

generic_create_table(con, table, fields, row.names = NA, temporary = FALSE,
  ...)

generic_append_table(con, table, values, row.names = NA, ...)

generic_clear_table(conn, table, use_delete = FALSE)

generic_quote_identifier(conn, x, ...)

generic_quote_string(conn, x, ...)

sql_dialect(name, sql_create_table = generic_create_table,
  sql_append_table = generic_append_table,
  sql_clear_table = generic_clear_table,
  sql_remove_table = generic_remove_table,
  sql_quote_identifier = generic_quote_identifier,
  sql_quote_string = generic_quote_string)

generic_sql

h2_dialect

derby_dialect

mysql_dialect

guess_dialect(driver_class)

Arguments

table_name

The quoted table name

field_names

A vector of quoted field names

field_types

A vector of the field types

temporary

If TRUE, will generate a temporary table statement.

statement_generator

A function which creates an sql create table statement

table

The table name

fields

Either a character vector or a data frame.

row.names

Either TRUE, FALSE, NA or a string.

If TRUE, always translate row names to a column called "row_names". If FALSE, never translate row names. If NA, translate rownames only if they're a character vector.

A string is equivalent to TRUE, but allows you to override the default name.

For backward compatibility, NULL is equivalent to FALSE.

...

Other parameters passed on to methods.

values

A data.frame

conn, con

An object of type JDBCConnection

use_delete

If TRUE, will use DELETE. If FALSE, TRUNCATE.

x

A character vector to label as being escaped SQL.

name

The name of the dialect

sql_create_table

A function which generates an SQL statement for creating a table

sql_append_table

A function which generates an SQL statement for adding data to the table

sql_clear_table

A function which generates an SQL statement for truncating a table

sql_remove_table

The function called by the dbRemoveTable,JDBCConnection,character-method method

sql_quote_identifier

The function called by the dbQuoteIdentifier,JDBCConnection,character-method method

sql_quote_string

The function called by the dbQuoteString,JDBCConnection,character-method method

driver_class

The full classname of a Java Driver class.

Format

An object of class sql_dialect of length 6.

Value

A new structure with class sql_dialect.

See Also

Other SQL dialect functions: dbj-sql-generate, dbj-sql-quote


hoesler/dbj documentation built on May 15, 2017, 11:53 p.m.