adityapandey9/rethinkdb-adapter

Broken Commit

Closed this issue · 1 comments

574d4c2

func NewAdapter(Sessionvar r.QueryExecutor) persist.Adapter {
	a := &adapter{session: Sessionvar, database: a.database, table: a.table}
	a.open()
	// Call the destructor when the object is released.
	runtime.SetFinalizer(a, finalizer)
	return a
}

// NewAdapter is the constructor for adapter.
func NewAdapter(Sessionvar r.QueryExecutor, string database, string table) persist.Adapter {
	a := &adapter{session: Sessionvar, database: database, table: table}
	a.open()
	// Call the destructor when the object is released.
	runtime.SetFinalizer(a, finalizer)
	return a
}

double defining functions, using variables before assigned, I think theres some severe copy paste errors

Thank you for the info. I have added default database and table name. In case if the user does not provide it.