sets the PostgreSQL service.
172177
def set_postgresql_service(database = nil, username = nil, password = nil)
      self.database  = database
      self.user_name = username
      self.password  = password
      self.service   = Credential::Service::POSTGRESQL
    end
1174425
def set_server(self, server_pos, key, value):
        """"""
        self.servers.set_server(server_pos, key, value)
858308
public void setObjectForStatement(PreparedStatement ps, int index,
                                      Object value, int sqlType) throws SQLException
    {
        if (sqlType == Types.TINYINT)
        {
            ps.setByte(index, ((Byte) value).byteValue());
        }
        else
        {
            super.setObjectForStatement(ps, index, value, sqlType);
        }
    }
246659
public void setServices(java.util.Collection<Service> services) {
        if (services == null) {
            this.services = null;
            return;
        }

        this.services = new com.amazonaws.internal.SdkInternalList<Service>(services);
    }
1105549
public AbstractSqlCreator setParameter(String name, Object value) {
        ppsc.setParameter(name, value);
        return this;
    }
1127468
@Override
    public void setService(final String name, final FrameworkSupportService service){
        synchronized (services){
            if(null==services.get(name) && null!=service) {
                services.put(name, service);
            }else if(null==service) {
                services.remove(name);
            }
        }
    }
914359
protected function setDbColumns()
    {
        $connection = $this->model()->eloquent()->getConnectionName();

        $this->dbColumns = collect(Schema::connection($connection)->getColumnListing($this->model()->getTable()));
    }
1179410
public function setService()
    {
        $serviceData = $this->getConfig('service.' . $this->service);
        foreach ($serviceData as $key => $value) {
            Arr::set($this->serviceData, $key, $value);
        }
        Arr::forget($this->configData,'service');
        return $this;
    }
574779
def main():
    """"""
    parser = argparse.ArgumentParser(
        description='Auto-generate a RESTful API service '
        'from an existing database.'
        )
    parser.add_argument(
        'URI',
        help='Database URI in the format '
             'postgresql+psycopg2://user:password@host/database')
    parser.add_argument(
        '-d',
        '--debug',
        help='Turn on debug logging',
        action='store_true',
        default=False)
    parser.add_argument(
        '-p',
        '--port',
        help='Port for service to listen on',
        default=5000)
    parser.add_argument(
        '-l',
        '--local-only',
        help='Only provide service on localhost (will not be accessible'
             ' from other machines)',
        action='store_true',
        default=False)
    parser.add_argument(
        '-r',
        '--read-only',
        help='Make all database resources read-only (i.e. only the HTTP GET method is supported)',
        action='store_true',
        default=False)
    parser.add_argument(
        '-s',
        '--schema',
        help='Use this named schema instead of default',
        default=None)


    args = parser.parse_args()
    app = get_app(args.URI, read_only=args.read_only, schema=args.schema)
    if args.debug:
        app.config['DEBUG'] = True
    if args.local_only:
        host = '127.0.0.1'
    else:
        host = '0.0.0.0'
    app.config['SECRET_KEY'] = '42'
    app.run(host=host, port=int(args.port))
354435
private synchronized void setService( final T newService )
    {
        if( m_service != newService )
        {
            LOG.debug( "Service changed [" + m_service + "]  -> [" + newService + "]" );
            final T oldService = m_service;
            m_service = newService;
            if( m_serviceListener != null )
            {
                m_serviceListener.serviceChanged( oldService, m_service );
            }
        }
    }
245877
public function setSql($sql)
    {
        $startTime = microtime(true);
        if ($this->result) {
            $startTime = $this->result->getStart();
        }
        $this->result = new Result();
        $this->result->setStart($startTime);
        if ($sql) {
            $sql = SqlFormatter::compress($sql);
            $this->sql = trim($sql, '; ');
            $this->setCommand($this->sql);
        }
    }
174557
public function enabledSqlLog()
    {
        if (!$this->sqlLogger) {
            $this->sqlLogger = new DebugStack();
            $this->dbConnection->getConfiguration()->setSQLLogger($this->sqlLogger);
        }
    }
597162
protected function setTimestampConfig()
    {
        $timestamp = $this->config["database.timestamp"];
        $this->timestamps = $this->timestamps === null
            ? ($timestamp["enabled"] ?? false)
            : $this->timestamps;
        $this->createdColumn = $this->createdColumn ?: ($timestamp["createdColumn"] ?? "created_at");
        $this->updatedColumn = $this->updatedColumn ?: ($timestamp["updatedColumn"] ?? "updated_at");
        $this->timestampFunction = $this->timestampFunction ?: ($timestamp["function"] ?? "NOW()");
    }
1273151
def SetWeekendService(self, has_service=True):
    """"""
    self.SetDayOfWeekHasService(5, has_service)
    self.SetDayOfWeekHasService(6, has_service)
1031443
private function configure(): void
    {
        $services = array_keys($this->container->findTaggedServiceIds('app.service'));
        foreach ($services as $service) {
            $service = $this->container->get($service);
            $this->services[$service->getName()] = $service;
        }
    }
689514
protected function setSort()
    {
        $this->sort = Input::get($this->sortName, []);
        if (!is_array($this->sort)) {
            return;
        }

        if (empty($this->sort['column']) || empty($this->sort['type'])) {
            return;
        }

        if (Str::contains($this->sort['column'], '.')) {
            $this->setRelationSort($this->sort['column']);
        } else {
            $this->resetOrderBy();

            // get column. if contains "cast", set set column as cast
            if (!empty($this->sort['cast'])) {
                $column = "CAST({$this->sort['column']} AS {$this->sort['cast']}) {$this->sort['type']}";
                $method = 'orderByRaw';
                $arguments = [$column];
            } else {
                $column = $this->sort['column'];
                $method = 'orderBy';
                $arguments = [$column, $this->sort['type']];
            }

            $this->queries->push([
                'method'    => $method,
                'arguments' => $arguments,
            ]);
        }
    }
320369
private static void setBlob(PreparedStatement ps, int i, Object o, Class<?> cls)
            throws SQLException {
        final InputStream is;
        if (o instanceof byte[]) {
            is = new ByteArrayInputStream((byte[]) o);
        }