Initialize the connection
327244
function(cb) {
    this._loadCollections();
    
    // Start Waterline
    var self = this;
    this._waterline.initialize(self.config, function(err, waterline) {
      if(err) throw err;
      
      hb.addModel('Account', waterline.collections['accounts-'+hb.env]);
      hb.addModel('Keyword', waterline.collections['keywords-'+hb.env]);
      
      cb();
    });
  }
1249605
public function initialize() : void
  {
    $connection = config('database.default');

    Accessor::$appRoot       = config('app.dir');
    UpstartConfig::$database = config("database.connections.{$connection}");

    if (!DB::start()) {
      $this->exception('Could not establish a database connection.');
    }

    $this->loadView();
  }
1021932
protected function onInit()
    {
        // $this->connection = Util::get($this->params,"connection",null);
        $connectionString = Util::get($this->params, "connectionString", "");
        $username = Util::get($this->params, "username", "");
        $password = Util::get($this->params, "password", "");
        $charset = Util::get($this->params, "charset");
        
        $key = md5($connectionString.$username.$password);
        if (PdoDataSource::$connections==null) {
            PdoDataSource::$connections = array();
        }
        if (isset(PdoDataSource::$connections[$key])) {
            $this->connection = PdoDataSource::$connections[$key];
        } else {
            $this->connection = new PDO($connectionString, $username, $password);
            PdoDataSource::$connections[$key] = $this->connection;
        }
        if ($charset) {
            $this->connection->exec("set names '$charset'");
        }
    }
122739
protected function init()
    {
        $this->client = new Client(
            $this->getOption('user_id'),
            $this->getOption('license_key'),
            $this->getOption('locales', ['en'])
        );
    }
1252613
protected function init()
    {
        $handle = curl_init();

        $this->handle = $handle;

        $this->setSerializer(new DefaultSerializer());
        $this->scheme = self::SCHEME_PLAIN;
        $this->httpOptions = array();
        $this->httpOptions[CURLOPT_RETURNTRANSFER] = true;
        $this->httpOptions[CURLOPT_FOLLOWLOCATION] = false;
    }
1110678
private function connect()
    {
        $this->conn = parent::getConn();
        $this->read = $this->conn->prepare($this->sql);
        $this->read->setFetchMode(\PDO::FETCH_ASSOC);
    }
685550
@Override
  public void initializeConnection() throws SQLException {
    super.initializeConnection();
    this.currentProtocol = null;
    //launching initial loop
    reconnectFailedConnection(new SearchFilter(true, false));
    resetMasterFailoverData();
  }
116040
private function buildInitialize() {
        $method = new Object\Method();
        $method->setAccess('public');
        $method->setDescription('Initializer, only called once per page load');
        $method->setName('initialize');
        $method->setReturnType('void');
        $method->setContent(
            '$this->setConnectionService(\'' . $this->getConfiguration()->getConnectionService() . '\');
		parent::initialize();
' . $this->buildValidation() . '
' . $this->buildRelationshipsBuffer() . '
' . $this->buildUpdateSkips()
        );
        $this->getAbstractClass()->addMethod($method);
    }
334916
def _init(self):
        """"""
        self._line_number = next_line(
            self._communication.last_requested_line_number,
            self._file.read(1)[0])
629143
private void initPool() {
        if (logger.isWarnEnabled()) {
            logger.warn("Start to initialize connection pool with url: " + url + " ...");
        }

        for (int i = 0; (i < initialSize) && (xpool.size() < initialSize); i++) {
            pool.lock();

            try {
                if (pool.isClosed()) {
                    break;
                }

                if ((i < initialSize) && (xpool.size() < initialSize)) {
                    PoolableConnection poolableConn = newConnection();

                    if (!pool.add(poolableConn)) {
                        detroyConnection(poolableConn);
                    }
                }
            } finally {
                pool.unlock();
            }
        }

        if (logger.isWarnEnabled()) {
            logger.warn("End to initialize connection pool with url: " + url + " ...");
        }
    }
594029
def init(port=8813, numRetries=10, host="localhost", label="default"):
    
    _connections[label] = connect(port, numRetries, host)
    switch(label)
    return getVersion()
53271
private void initialize() {
        createKeysIfNotExist();
        if (keyPair == null) {
            try {
                loadKeyPair();
            } catch (IOException | NoSuchAlgorithmException | InvalidKeySpecException e) {
                LOGGER.error("An error occurred loading key pair");
                LOGGER.error(e.getMessage());
            }
        }
        if (secretKey == null) {
            try {
                loadSecretKey();
            } catch (IOException | ClassNotFoundException e) {
                LOGGER.error("An error occurred loading secret key");
                LOGGER.error(e.getMessage());
            }
        }
    }
1318035
@Override
  public void initializeConnection() throws SQLException {
    super.initializeConnection();
    try {
      reconnectFailedConnection(new SearchFilter(true));
    } catch (SQLException e) {
      //initializeConnection failed
      checkInitialConnection(e);
    }
  }
605599
protected function init()
    {
        global $wpdb;
        $this->wpdb = $wpdb;
        $this->queryGrammar = new MySqlGrammar();
        $this->postProcessor = new MySqlProcessor();
    }
1077531
public void init(HttpInboundConnection conn, RequestMessage req) {
        this.request = req;
        this.response = conn.getResponse();
        this.connection = conn;
        this.outStream = new ResponseBody(this.response.getBody());
        this.locale = Locale.getDefault();
    }
506617
@Initialize
    public void init() {
        logger.info("Initializing dictionary: {}", this);
        Datastore datastore = getDatastore();
        DatastoreConnection dataContextProvider = datastore.openConnection();
        getDatastoreConnections().add(dataContextProvider);
    }
758309
def init(cls, conn_string=None):
        """"""
        if conn_string:
            _update_meta(conn_string)
            # We initialize the engine within the models module because models'
            # schema can depend on which data types are supported by the engine
            Meta.Session = new_sessionmaker()
            Meta.engine = Meta.Session.kw["bind"]
            logger.info(
                f"Connecting user:{Meta.DBUSER} "
                f"to {Meta.DBHOST}:{Meta.DBPORT}/{Meta.DBNAME}"
            )
            Meta._init_db()

        if not Meta.log_path:
            init_logging()

        return cls