!C99Shell v. 2.5 [PHP 8 Update] [24.05.2025]!

Software: Apache/2.4.41 (Ubuntu). PHP/8.0.30 

uname -a: Linux apirnd 5.4.0-204-generic #224-Ubuntu SMP Thu Dec 5 13:38:28 UTC 2024 x86_64 

uid=33(www-data) gid=33(www-data) groups=33(www-data) 

Safe-mode: OFF (not secure)

/var/www/html/wincloud_gateway/node_modules/knex/lib/dialects/postgres/schema/   drwxr-xr-x
Free 13.11 GB of 57.97 GB (22.61%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


Viewing file:     compiler.js (2.93 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
// PostgreSQL Schema Compiler
// -------

const inherits = require('inherits');
const SchemaCompiler = require('../../../schema/compiler');

function SchemaCompiler_PG() {
  SchemaCompiler.apply(this, arguments);
}
inherits(SchemaCompiler_PG, SchemaCompiler);

// Check whether the current table
SchemaCompiler_PG.prototype.hasTable = function(tableName) {
  let sql = 'select * from information_schema.tables where table_name = ?';
  const bindings = [tableName];

  if (this.schema) {
    sql += ' and table_schema = ?';
    bindings.push(this.schema);
  } else {
    sql += ' and table_schema = current_schema()';
  }

  this.pushQuery({
    sql,
    bindings,
    output(resp) {
      return resp.rows.length > 0;
    },
  });
};

// Compile the query to determine if a column exists in a table.
SchemaCompiler_PG.prototype.hasColumn = function(tableName, columnName) {
  let sql =
    'select * from information_schema.columns where table_name = ? and column_name = ?';
  const bindings = [tableName, columnName];

  if (this.schema) {
    sql += ' and table_schema = ?';
    bindings.push(this.schema);
  } else {
    sql += ' and table_schema = current_schema()';
  }

  this.pushQuery({
    sql,
    bindings,
    output(resp) {
      return resp.rows.length > 0;
    },
  });
};

SchemaCompiler_PG.prototype.qualifiedTableName = function(tableName) {
  const name = this.schema ? `${this.schema}.${tableName}` : tableName;
  return this.formatter.wrap(name);
};

// Compile a rename table command.
SchemaCompiler_PG.prototype.renameTable = function(from, to) {
  this.pushQuery(
    `alter table ${this.qualifiedTableName(
      from
    )} rename to ${this.formatter.wrap(to)}`
  );
};

SchemaCompiler_PG.prototype.createSchema = function(schemaName) {
  this.pushQuery(`create schema ${this.formatter.wrap(schemaName)}`);
};

SchemaCompiler_PG.prototype.createSchemaIfNotExists = function(schemaName) {
  this.pushQuery(
    `create schema if not exists ${this.formatter.wrap(schemaName)}`
  );
};

SchemaCompiler_PG.prototype.dropSchema = function(schemaName) {
  this.pushQuery(`drop schema ${this.formatter.wrap(schemaName)}`);
};

SchemaCompiler_PG.prototype.dropSchemaIfExists = function(schemaName) {
  this.pushQuery(`drop schema if exists ${this.formatter.wrap(schemaName)}`);
};

SchemaCompiler_PG.prototype.dropExtension = function(extensionName) {
  this.pushQuery(`drop extension ${this.formatter.wrap(extensionName)}`);
};

SchemaCompiler_PG.prototype.dropExtensionIfExists = function(extensionName) {
  this.pushQuery(
    `drop extension if exists ${this.formatter.wrap(extensionName)}`
  );
};

SchemaCompiler_PG.prototype.createExtension = function(extensionName) {
  this.pushQuery(`create extension ${this.formatter.wrap(extensionName)}`);
};

SchemaCompiler_PG.prototype.createExtensionIfNotExists = function(
  extensionName
) {
  this.pushQuery(
    `create extension if not exists ${this.formatter.wrap(extensionName)}`
  );
};

module.exports = SchemaCompiler_PG;

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

:: Make Dir ::
 
[ Read-Only ]
:: Make File ::
 
[ Read-Only ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0295 ]--