Create the record.
432666
def __create_rec(*args, **kwargs):
        '''
        
        '''
        uid = args[0]
        kind = args[1]
        post_data = kwargs['post_data']

        try:
            TabWiki.create(
                uid=uid,
                title=post_data['title'].strip(),
                date=datetime.datetime.now(),
                cnt_html=tools.markdown2html(post_data['cnt_md']),
                time_create=tools.timestamp(),
                user_name=post_data['user_name'],
                cnt_md=tornado.escape.xhtml_escape(post_data['cnt_md']),
                time_update=tools.timestamp(),
                view_count=1,
                kind=kind,  # 1 for wiki,  2 for page
            )
            return True
        except:
            return False
1215280
def create_new_migration_record(self):
        
        migration_record = self.migration_model(
            name=self.name,
            version=self.latest_migration)
        self.session.add(migration_record)
        self.session.commit()
290102
def build_record
      record = model.new
      record.send("#{parent_association.name}=", parent_record) if parent_record
      record.build_defaults if record.respond_to?(:build_defaults)
      record
    end
271914
public function build(): SetRecordingRequest
	{
		$instance = new SetRecordingRequest();
		if ($this->shouldRecord === null) {
			throw new BuilderException('Property [shouldRecord] is required.');
		}
		$instance->shouldRecord = $this->shouldRecord;
		if ($this->service === null) {
			throw new BuilderException('Property [service] is required.');
		}
		$instance->service = $this->service;
		return $instance;
	}
1204833
def _create_request_record(self, identifier, rtype, name, content, ttl, priority):  # pylint: disable=too-many-arguments
        """"""
        record = collections.OrderedDict()

        # Mandatory content

        # Just for update - not for creation
        if identifier is not None:
            record['id'] = identifier

        record['type'] = rtype

        # Just for creation - not for update
        if name is not None:
            record['name'] = self._relative_name(name)

        # Optional content
        if content is not None:
            record['content'] = content
        if ttl is not None:
            record['ttl'] = ttl
        if priority is not None:
            record['prio'] = priority
        return record
1022872
def format_record(record):
    """"""

    record = dict(
        (key, getattr(record, key, None))
        for key in (
            "threadName",
            "name",
            "thread",
            "created",
            "process",
            "processName",
            "args",
            "module",
            "filename",
            "levelno",
            "exc_text",
            "pathname",
            "lineno",
            "msg",
            "exc_info",
            "funcName",
            "relativeCreated",
            "levelname",
            "msecs")
    )

    # Humanise output and conform to Exceptions
    record["message"] = str(record.pop("msg"))

    if os.getenv("PYBLISH_SAFE"):
        schema.validate(record, "record")

    return record
316132
def emit(self, record: logging.LogRecord):
        """"""
        created = datetime.datetime.fromtimestamp(record.created, timezone)
        obj = {
            "level": record.levelname.lower(),
            "msg": record.msg % record.args,
            "source": "%s:%d" % (record.filename, record.lineno),
            "time": format_datetime(created),
            "thread": reduce_thread_id(record.thread),
        }
        if record.exc_info is not None:
            obj["error"] = traceback.format_exception(*record.exc_info)[1:]
        try:
            obj["context"] = self.local.context
        except AttributeError:
            pass
        json.dump(obj, sys.stdout, sort_keys=True)
        sys.stdout.write("\n")
        sys.stdout.flush()
857364
def build_records(amount, per_query, &block)
      amount.times do
        index = last_id_in_database + @records.size + 1
        record = Record.new(@model_class, index)
        @records << record
        block.call(record, index) if block
        save_records if @records.size >= per_query
      end
    end
402977
def setRecord( self, record ):
        
        self._record = record
        
        if ( not record ):
            return
        
        self.setModel(record.__class__)
        schema = self.model().schema()
        
        # set the information
        column_edits = self.findChildren(XOrbColumnEdit)
        for widget in column_edits:
            columnName  = widget.columnName()
            column      = schema.column(columnName)
            
            if ( not column ):
                logger.warning('%s is not a valid column of %s.' % \
                               (columnName, schema.name()))
                continue
                
            # update the values
            widget.setValue(record.recordValue(columnName))
1153646
function createRecord (snapshot) {
  var value = snapshot.val()
  var res = isObject(value)
    ? value
    : { '.value': value }
  res['.key'] = _getKey(snapshot)
  return res
}
691828
def _create_record(self, rtype, name, content):
        
        with self._session(self.domain, self.domain_id) as ddata:
            # Validate method parameters
            if not rtype or not name or not content:
                LOGGER.warning('Hetzner => Record has no rtype|name|content specified')
                return False

            # Add record to zone
            name = ddata['cname'] if ddata['cname'] else self._fqdn_name(name)
            rrset = ddata['zone']['data'].get_rdataset(name, rdtype=rtype, create=True)
            for rdata in rrset:
                if self._convert_content(rtype, content) == rdata.to_text():
                    LOGGER.info('Hetzner => Record with content \'%s\' already exists',
                                content)
                    return True

            ttl = (rrset.ttl if 0 < rrset.ttl < self._get_lexicon_option('ttl')
                   else self._get_lexicon_option('ttl'))
            rdataset = dns.rdataset.from_text(rrset.rdclass, rrset.rdtype,
                                              ttl, self._convert_content(rtype, content))
            rrset.update(rdataset)
            # Post zone to Hetzner
            synced_change = self._post_zone(ddata['zone'])
            if synced_change:
                self._propagated_record(rtype, name, self._convert_content(rtype, content),
                                        ddata['nameservers'])
            return synced_change
151267
def _create_record(attribute_names = self.attribute_names)
      attribute_names = attributes_for_create(attribute_names)

      new_id = self.class._insert_record(
        attributes_with_values(attribute_names)
      )

      self.id ||= new_id if @primary_key

      @new_record = false

      yield(self) if block_given?

      id
    end
1257503
def from_record(self, record):
        """"""

        self.record = record
        self._setup_tls_files(self.record['files'])
        return self
1228810
def create_record(attribute_names = @attributes.keys)
      record_timestamps_hardcoded
      attributes_values = self.changes.values.map(&:last)

      row_hash = Hash[ [ self.changes.keys, attributes_values ].transpose ]
      new_id =  SecureRandom.hex
      @rows =   {"rows"=> [{
                            "insertId"=> Time.now.to_i.to_s,
                            "json"=> row_hash.merge("id"=> new_id)
                          }]
                }
      conn_cfg = self.class.connection_config
      result = BigBroda::TableData.create(conn_cfg[:project],
        conn_cfg[:database],
        self.class.table_name ,
        @rows )

      #raise result["error"]["errors"].map{|o| "[#{o['domain']}]: #{o['reason']} #{o['message']}" }.join(", ") if result["error"].present?
      #here we output the IN MEMORY id , because of the BQ latency
      self.id = new_id #||= new_id if self.class.primary_key

      @new_record = false
      id
    end
1061836
def create(self, name, **kwds):
        
        result = self._client.post("/album/create.json",
                                   name=name, **kwds)["result"]
        return Album(self._client, result)
605772
def create(self, **fields):
        """"""
        entry = self.instance(**fields)
        entry.save()
        return entry
316578
public Record createSubRecord()
    {
        Record record = (Record)ClassServiceUtility.getClassService().makeObjectFromClassName(m_strSubFile);
        if (record != null)
        {
            RecordOwner recordOwner = Record.findRecordOwner(this.getOwner());
            record.init(recordOwner);
            if (recordOwner != null)
                recordOwner.removeRecord(record);
            this.getOwner().addListener(new FreeOnFreeHandler(record));
        }
        return record;
    }