Save this instance to the database.
540587
public function save()
    {
        $em = Application::getFacadeApplication()->make(EntityManagerInterface::class);
        $em->persist($this);
        $em->flush();
    }
683180
def save(self, obj):
        """"""
        if not obj.id:
            obj.id = uuid()

        index_names = obj.__class__.index_names() or []
        index_dict = obj.indexes() or {}
        index_name_values = [
            (key, index_dict.get(key, ''))
            for key in index_names
        ]

        write_rec(
            obj.__class__.get_table_name(),
            obj.id,
            obj.to_data(),
            index_name_values
        )
108633
def save(self, *, auto_commit=False):
        
        try:
            db.session.add(self.resource)
            if auto_commit:
                db.session.commit()
        except SQLAlchemyError as ex:
            self.log.exception('Failed updating resource: {}'.format(ex))
            db.session.rollback()
1271277
def save(self):
        

        kf = self._kf

        # force all attributes to be computed. this is only necessary
        # if the class uses properties that compute data only when
        # accessed
        for prop in self.properties:
            self._DL[prop[0]].append(getattr(kf, prop[0]))

        v = copy.deepcopy(kf.__dict__)

        if self._skip_private:
            for key in list(v.keys()):
                if key.startswith('_'):
                    print('deleting', key)
                    del v[key]

        if self._skip_callable:
            for key in list(v.keys()):
                if callable(v[key]):
                    del v[key]

        for ig in self._ignore:
            if ig in v:
                del v[ig]

        for key in list(v.keys()):
            self._DL[key].append(v[key])

        self.__dict__.update(self._DL)
        self._len += 1
636875
def save(self, commit=True):
        

        if self.errors:
            raise ValueError("The %s could not be saved because the data didn't"
                             " validate." % self.instance._meta.object_name)

        # create entity instance, don't save yet
        instance = super(BaseDynamicEntityForm, self).save(commit=False)

        # assign attributes
        for name in instance.get_schema_names():
            value = self.cleaned_data.get(name)
            setattr(instance, name, value)

        # save entity and its attributes
        if commit:
            instance.save()

        return instance
508741
def save(self, commit=True):
        """"""

        # walk through the document fields
        for field_name, field in iter_valid_fields(self._meta):
            setattr(self.instance, field_name, self.cleaned_data.get(field_name))

        if commit:
            self.instance.save()

        return self.instance
1243031
def save(self, obj):
        """"""
        if not obj.id:
            obj.id = uuid()

        stored_data = {
            '_id': obj.id,
            'value': json.loads(obj.to_data())
        }

        index_vals = obj.indexes() or {}
        for key in obj.__class__.index_names() or []:
            val = index_vals.get(key, '')
            stored_data[key] = str(val)

        coll = self.get_collection(obj.__class__.get_table_name())
        coll.update({"_id": obj.id}, stored_data, upsert=True)
712581
private function _save() : void
    {
        $this->_storage->save(
            $this->_host,
            $this->_storageKey,
            $this->_requestCount,
            $this->_timekeeper->getExpiration(),
            $this->getRemainingSeconds()
        );
    }
1043393
protected function save()
    {
        $this->db->createCommand()->update($this->tableName, [
            'updated_at' => time(),
            'data' => [serialize($this->_states), \PDO::PARAM_LOB],
            ], ['id' => $this->_id])->execute();
    }
7061
public function save()
    {
    	if($this->exists())
    	{
			// update
			$query = new Query(static::table());
			$query->update($this->getData(), $this->getIdentifyCondition());
			return $query->execute();
    	}
    	else
    	{
    		// insert
			$query = new Query(static::table());
			$query->insert($this->getData());
            if($query->execute())
                $this->from_db = true;
            return $query->success();
    	}
    }
355196
public function save()
    {
        $redis = static::__getRedis($this);
        if(null === $this->__ttl)
        {
            $redis->set($this->__getKey(), $this->toArray());
        }
        else
        {
            $redis->set($this->__getKey(), $this->toArray(), $this->__ttl);
        }
    }
932424
def save(self):
        """"""
        data = str.encode( json.dumps(self.simpleAttrs, indent=4, sort_keys=True) )
        with open(self.filename, "wb") as f:
            f.write(data)
277019
def _save_db():
    """"""
    from pyci.utility import json_serial
    import json
    vms("Serializing DB to JSON in {}".format(datapath))
    with open(datapath, 'w') as f:
        json.dump(db, f, default=json_serial)
304663
def save(self, output=None):
        
        if output is None:
            if self.dbfile is None:
                return
            output = self.dbfile

        with open(output, 'w') as f:
            f.write(self._dump())
604730
def save(self, key, data):
        
        self._db[key] = json.dumps(data)
        self._db.sync()
797396
public function save()
    {
        $query = new QueryBuilder(self::$_connection);

        if($this->_isInsert) {
            $query->insert($this->getTable())
                  ->values($this->_changed);

            $id = self::$_connection->insert($query->getQuery());
            $this->_data[$this->_primaryKey] = $id;

            $this->_isInsert = false;
            $this->_changed  = [];

            return;
        }

        $query->update($this->getTable())
              ->set($this->_changed)
              ->where([
                  $this->_primaryKey => $this->_data[$this->_primaryKey]
              ])
              ->execute();

        $this->_changed = [];
    }
718103
protected function __save()
    {
        $this->parseDate();
        foreach($this->records as $record)
        {
            FileUtil::writeFile($this->getFileName(), $this->getLogString($record) . PHP_EOL, FILE_APPEND);
        }
    }