{"modulePath":"github.com/benthosdev/benthos/v4","version":"v4.27.0","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package sql\n\n## Functions\n\n```go\nfunc DeprecatedProcessorConfig() *service.ConfigSpec\n```\nDeprecatedProcessorConfig returns a config spec for an sql processor.\n\n```go\nfunc InsertProcessorConfig() *service.ConfigSpec\n```\nInsertProcessorConfig returns a config spec for an sql\\_insert processor.\n\n```go\nfunc NewSQLDeprecatedProcessorFromConfig(conf *service.ParsedConfig, mgr *service.Resources) (*sqlRawProcessor, error)\n```\nNewSQLDeprecatedProcessorFromConfig returns an internal sql processor.\n\n```go\nfunc NewSQLInsertProcessorFromConfig(conf *service.ParsedConfig, mgr *service.Resources) (*sqlInsertProcessor, error)\n```\nNewSQLInsertProcessorFromConfig returns an internal sql\\_insert processor.\n\n```go\nfunc NewSQLRawProcessorFromConfig(conf *service.ParsedConfig, mgr *service.Resources) (*sqlRawProcessor, error)\n```\nNewSQLRawProcessorFromConfig returns an internal sql\\_raw processor.\n\n```go\nfunc NewSQLSelectProcessorFromConfig(conf *service.ParsedConfig, mgr *service.Resources) (*sqlSelectProcessor, error)\n```\nNewSQLSelectProcessorFromConfig returns an internal sql\\_select processor.\n\n```go\nfunc RawProcessorConfig() *service.ConfigSpec\n```\nRawProcessorConfig returns a config spec for an sql\\_raw processor.\n\n```go\nfunc SQLiteBufferConfig() *service.ConfigSpec\n```\nSQLiteBufferConfig returns a config spec for an SQLite buffer.\n\n```go\nfunc SelectProcessorConfig() *service.ConfigSpec\n```\nSelectProcessorConfig returns a config spec for an sql\\_select processor.\n\n## Types\n\n```go\ntype SQLiteBuffer struct {\n\t// contains filtered or unexported fields\n}\n```\nSQLiteBuffer stores messages for consumption through an SQLite DB.\n\n```go\nfunc NewSQLiteBufferFromConfig(conf *service.ParsedConfig, res *service.Resources) (*SQLiteBuffer, error)\n```\nNewSQLiteBufferFromConfig creates a new SQLite buffer from a parsed config.\n\n```go\nfunc (m *SQLiteBuffer) Close(ctx context.Context) error\n```\nClose the underlying DB connection.\n\n```go\nfunc (m *SQLiteBuffer) EndOfInput()\n```\nEndOfInput signals to the buffer that the input is finished and therefore once the DB is drained it should close.\n\n```go\nfunc (m *SQLiteBuffer) ReadBatch(ctx context.Context) (service.MessageBatch, service.AckFunc, error)\n```\nReadBatch attempts to pop a row from the DB.\n\n```go\nfunc (m *SQLiteBuffer) WriteBatch(ctx context.Context, msgBatch service.MessageBatch, aFn service.AckFunc) error\n```\nWriteBatch adds a new message to the DB.\n\n","path":"github.com/benthosdev/benthos/v4/internal/impl/sql","name":"sql","synopsis":"","isRedistributable":true}
