C# 클래스 Azavea.NijPredictivePolicing.Parsers.AccessDBValueWriter

a basic implementation of the IDataWriter interface, so we can simply export tab separated value files
상속: IDataFileWriter
파일 보기 프로젝트 열기: azavea/acs-alchemist

보호된 프로퍼티들

프로퍼티 타입 설명
_conn System.Data.Common.DbConnection
_filename string
_insertCmd System.Data.Common.DbCommand
_tablename string
_tablenames List

공개 메소드들

메소드 설명
AccessDBValueWriter ( ) : System

construct a new blank writer (any writes will throw exceptions if you don't set a stream or a file!)

AccessDBValueWriter ( string filename ) : System

construct a new writer to append to the given file

Close ( ) : bool

closes the underlying stream

CreateTable ( string tablename, IEnumerable columns ) : bool
Flush ( ) : bool

flushes the stream

IsOpen ( ) : bool

returns true if the database connection is open and ready

SetTablename ( string tableName ) : void
SetWriteFile ( string filename ) : bool

Opens or creates an MS Access database file for writing

TableNames ( ) : List

pulls a list of datatable names from the database and caches them. (this list does not refresh, because this reader is read-only)

WriteLine ( IEnumerable values ) : bool

Make sure you have a value for every column! This is really intentionally not thread safe, do not share this class across threads.

메소드 상세

AccessDBValueWriter() 공개 메소드

construct a new blank writer (any writes will throw exceptions if you don't set a stream or a file!)
public AccessDBValueWriter ( ) : System
리턴 System

AccessDBValueWriter() 공개 메소드

construct a new writer to append to the given file
public AccessDBValueWriter ( string filename ) : System
filename string
리턴 System

Close() 공개 메소드

closes the underlying stream
public Close ( ) : bool
리턴 bool

CreateTable() 공개 메소드

public CreateTable ( string tablename, IEnumerable columns ) : bool
tablename string
columns IEnumerable
리턴 bool

Flush() 공개 메소드

flushes the stream
public Flush ( ) : bool
리턴 bool

IsOpen() 공개 메소드

returns true if the database connection is open and ready
public IsOpen ( ) : bool
리턴 bool

SetTablename() 공개 메소드

public SetTablename ( string tableName ) : void
tableName string
리턴 void

SetWriteFile() 공개 메소드

Opens or creates an MS Access database file for writing
public SetWriteFile ( string filename ) : bool
filename string
리턴 bool

TableNames() 공개 메소드

pulls a list of datatable names from the database and caches them. (this list does not refresh, because this reader is read-only)
public TableNames ( ) : List
리턴 List

WriteLine() 공개 메소드

Make sure you have a value for every column! This is really intentionally not thread safe, do not share this class across threads.
public WriteLine ( IEnumerable values ) : bool
values IEnumerable
리턴 bool

프로퍼티 상세

_conn 보호되어 있는 프로퍼티

an open connection to the database (opened when constructed, or from LoadFile)
protected DbConnection,System.Data.Common _conn
리턴 System.Data.Common.DbConnection

_filename 보호되어 있는 프로퍼티

the ms access database filename
protected string _filename
리턴 string

_insertCmd 보호되어 있는 프로퍼티

a reusable parameterized insert command to help speed up our writer.
protected DbCommand,System.Data.Common _insertCmd
리턴 System.Data.Common.DbCommand

_tablename 보호되어 있는 프로퍼티

the currently selected table name in the ms access database
protected string _tablename
리턴 string

_tablenames 보호되어 있는 프로퍼티

a one-time cached of tables available in the database
protected List _tablenames
리턴 List