Method: Fb::Database.connect

Defined in:
ext/fb/fb_ext.c

.connect(options) ⇒ Connection .connect(options) {|connection| ... } ⇒ nil

Connect to a database using the options given (see: Database.new for details of options Hash).

If a block is provided, the open connection is passed to it before being automatically closed.

Overloads:

  • .connect(options) ⇒ Connection

    Returns:

  • .connect(options) {|connection| ... } ⇒ nil

    Yields:

    • (connection)

    Returns:

    • (nil)


2902
2903
2904
2905
2906
2907
# File 'ext/fb/fb_ext.c', line 2902

static VALUE database_s_connect(int argc, VALUE *argv, VALUE klass)
{
	VALUE obj = database_allocate_instance(klass);
	database_initialize(argc, argv, obj);
	return database_connect(obj);
}