Initializes this relation with the given database, field, and options.

@param  {Rekord.Database} database [description]
@param  {String} field    [description]
@param  {Object} options  [description]
3630
function(database, field, options)
  {
    applyOptions( this, options, this.getDefaults( database, field, options ) );

    this.database = database;
    this.name = field;
    this.options = options;
    this.initialized = false;
    this.property = this.property || (indexOf( database.fields, this.name ) !== false);
    this.discriminated = !isEmpty( this.discriminators );

    if ( this.discriminated )
    {
      if ( !Polymorphic )
      {
        throw 'Polymorphic feature is required to use the discriminated option.';
      }

      Class.props( this, Polymorphic );
    }

    this.setReferences( database, field, options );
  }
301081
public void init(Record record, int iFieldSeq, String fieldName, int iSecondaryFieldSeq, String secondaryFieldName)
    {
        Converter converter = null;
        m_recMerge = record;
        m_iFieldSeq = iFieldSeq;
        m_iSecondaryFieldSeq = iSecondaryFieldSeq;
        this.fieldName = fieldName;
        this.secondaryFieldName = secondaryFieldName;
        if (record != null)
            converter = this.getTargetField(null);
        super.init(converter, null);
        if (record != null)
            record.addListener(new RemoveConverterOnCloseHandler(this));    // Because this is a converter (not a fieldConverter)
        if (m_recMerge != null)
            if (m_recMerge.getTable() instanceof MultiTable)
        {   // Add all the fields in the sub-records
            MultiTable multiTable = (MultiTable)m_recMerge.getTable();
            Iterator<BaseTable> iterator = multiTable.getTables();
            while (iterator.hasNext())
            {
                BaseTable table = (BaseTable)iterator.next();
                Converter field = this.getTargetField(table.getRecord());
                this.addConverterToPass(field);     // Add it, and
            }
        }
    }
685525
public void init(MDatabase pDatabase, FieldList record, Object key)
    {
        super.init(pDatabase, record, key);
        m_bDataIn = false;
    }
536125
function Model(attributes, options) {
  var _attributes = attributes || {};
  options = options || {};
  this.attributes = Object.create(null);
  this.set(_attributes, options);
  this.initialize.apply(this, arguments);
}
625290
function databaseInitialize() {
  // on the first load of (non-existent database), we will have no collections so we can 
  //   detect the absence of our collections and add (and configure) them now.
  var entries = db.getCollection("entries");
  if (entries === null) {
    entries = db.addCollection("entries");
  }

  // kick off any program logic or start listening to external events
  runProgramLogic();
}
848128
def init(module, db):
    
    for model in farine.discovery.import_models(module):
        model._meta.database = db
589043
function(instance, relatedObject, options) {
    var opts = _.defaults({}, options, { follow: true, attrs: true });
    var inverse = opts.follow && relatedObject[this.inverse + 'Relation'];

    if (opts.attrs) {
      // set the foreign key property as well
      instance.setAttribute(this.foreignKeyAttr, undefined);
    }

    this._setRelated(instance, undefined);

    if (inverse) {
      inverse.disassociate(relatedObject, instance, _.extend({}, options, {
        follow: false,
      }));
    }
  }
231457
def _init_db(self):
        """"""
        with self._get_db() as db:
            with open(self.schemapath) as f:
                db.cursor().executescript(f.read())
            db.commit()
656761
public void init(BaseField field, String iFieldSeq)
    {
        super.init(field);
        m_iFieldSeq = iFieldSeq;

        m_bReadMove = false;
    }
752549
function(parent, field, options) {  
  options = options || {};
  // Unique id for this node's generated method
  this.id = utils.generateId();
  // Link to parent node
  this.parent = parent;
  // The field related to this node
  this.field = field;
  // Any options
  this.options = options;
  // Just some metadata
  this.type = 'custom';
  // Custom context
  this.context = {};  
}
335352
public void init(Record record, DateTimeField field)
    {
        super.init(record);
        m_field = field;
        FieldDataScratchHandler listener = new FieldDataScratchHandler(null);
        listener.setAlwaysEnabled(true);    // Since this holds the current key
        m_field.addListener(listener); // I will need the original value for the sql update
        this.setMasterSlaveFlag(FileListener.RUN_IN_SLAVE | FileListener.RUN_IN_MASTER); // Set date key in slave code, check for error in master code
    }
358488
public function init_button($field)
    {
        $this->on('click', '.do-'.$field)->univ()->ajaxec(array(
            $this->app->url(),
            $field => $a = $this->js()->_selectorThis()->data('id'),
            $this->name.'_'.$field => $a,
            ));

        /*
        $this->columns[$field]['thparam'] .= ' style="width: 40px; text-align: center"';
        $this->js(true)->find('.button_'.$field)->button();
        */
    }
622620
function Table(name, db, options) {
  this.name = name;
  this.db = db; // the name of the database
  this.options = options || {};
  this.options.primaryKey = this.options.primary_key || "id";
  this.documents = {};
  this.indexes = {}; // String -> FUNC terms
  this.indexes[this.options.primaryKey] = {
    //TODO Make me use TERMS
    //fn: function(doc) { return doc[name] },
    // 69=FUNC, 2=MAKE_ARRAY, 31=GET_FIELD, 10=VAR, 1=ARGUMENT_INDEX
    //TODO Use a uuid to avoid collision
    fn: [ 69, [ [ 2, [ 1 ] ], [ 31, [ [ 10, [ 1 ] ], this.options.primaryKey ] ] ] ],
    function: { /* TODO */ },
    geo: false,
    outdated: false,
    ready: true,
    multi: false
  };
  this.id = util.uuid();
  if (options.meta === true) {
    // meta table
    this.meta = true;
  }
}
705093
function initField (form, args) {
    // field specification to return
    var field = {}
    // get model
    var model = form.model
    // set default based on schema data
    if (form.model.schemaData) {
        // get data properites from schema
        var properties = form.model.schemaData.properties
        // create lookup table of required properties
        var required = _.zipObject(form.model.schemaData.required, _.map(form.model.schemaData.required, () => true))
    }
    else {
        var properties = {}
        var required = {}
    }
    // string is passed then use as property name
    if (typeof args === 'string') {
        field.property = args
        // set args as empty object so that it can be checked for values
        args = {}
    }
    else {
        // require field to be object
        assert.ok(args && typeof args === 'object', 'field must be object')
        // field can be a section divider
        if (args.legend) {
            return args
        }
        else {
            // require field to have property
            assert.ok(typeof args.property === 'string' && args.property.length, 'field must have property')
            // set property from args
            field.property = args.property
        }
    }
    // if property is required make field required
    if (required[field.property]) {
        field.required = true
    }
    // set path base on property name
    field.path = changeCase.paramCase(field.property)
    // get property schema for field
    var schema = properties[field.property]
    // build field data from args and schema
    return buildField(args, field, form, model, schema)
}
595863
function Database(pg) {
  this.pg = pg;
  this.defaults = pg.defaults;
  this.connect = this.connect.bind(this);
  this.end = this.end.bind(this);
}
135765
public void init(BaseField field)
    {
        super.init(field);
        m_bScreenMove = false;
        m_bInitMove = true;     // Only respond to init
        m_bReadMove = false;
    }
694034
public void init(BaseField field, BaseListener listenerToDisable,  String strDisableOnMatch,  boolean bDisableIfMatch)
    {
        super.init(field);
        m_listenerToDisable = listenerToDisable;
        m_strDisableOnMatch = strDisableOnMatch;
        m_bDisableIfMatch = bDisableIfMatch;
    }