Giter Site home page Giter Site logo

dbd-null's Introduction

dbd-null

Build Status

This is a very primitive database driver for libdbi, that does pretty much nothing. It does just enough to make syslog-ng work with it without throwing errors all over the place.

That's all there is to it, nothing more, nothing less, and it will very likely stay that way. Except when it doesn't, and the driver gets repurposed for another use-case: simulating slow databases.

The driver now accepts a set of options, which will make the driver sleep for the set time (if the option is unset, no sleeping will happen) when performing the appropriate function:

  • null.sleep.connect
  • null.sleep.disconnect
  • null.sleep.list_dbs
  • null.sleep.list_tables
  • null.sleep.query
  • null.sleep.query_null
  • null.sleep.select_db
  • null.sleep.ping

The driver also accepts the following other options:

  • null.error.commit: When set to a non-zero value, and the driver receives a query starting with COMMIT, the query will fail instead of returning an empty result.
  • null.error.query: Similarly to null.error.commit, when set to a non-zero value, every query the driver receives will fail instead of returning an empty result.
  • null.error.query.nth: Similarly to null.error.query, when set to a non-zero value, every nth query the driver receives will fail instead of returning an empty result.
  • null.geterror.errno: When dbi_conn_get_error() is called, this option is checked to see what errno to set. If unset, the driver uses 0.
  • null.geterror.errmsg: When dbi_conn_get_error() is called, this option is checked to see what error message should be set. If unset, the driver sets the error message to NULL.
  • null.log.filename: When set, most operations (connect, disconnect, and queries) will be logged to the given filename.

dbd-null's People

Contributors

algernon avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.