Fixed code smell 'Default parameters should be last' reported by SonarQube.

This commit is contained in:
Akshay Joshi 2022-01-12 18:40:18 +05:30
parent c98fb887cc
commit 4e414f57e6
50 changed files with 72 additions and 72 deletions

View File

@ -10,7 +10,7 @@ import gettext from 'sources/gettext';
import BaseUISchema from 'sources/SchemaView/base_schema.ui'; import BaseUISchema from 'sources/SchemaView/base_schema.ui';
import { isEmptyString } from 'sources/validators'; import { isEmptyString } from 'sources/validators';
export default class CastSchema extends BaseUISchema { export default class CastSchema extends BaseUISchema {
constructor(fieldOptions={}, initValues) { constructor(fieldOptions={}, initValues={}) {
super({ super({
name: undefined, // Name of the cast name: undefined, // Name of the cast
encoding: 'UTF8', encoding: 'UTF8',

View File

@ -14,7 +14,7 @@ import { isEmptyString } from 'sources/validators';
export default class EventTriggerSchema extends BaseUISchema { export default class EventTriggerSchema extends BaseUISchema {
constructor(fieldOptions={}, initValues) { constructor(fieldOptions={}, initValues={}) {
super({ super({
oid: undefined, oid: undefined,
name: undefined, name: undefined,

View File

@ -12,7 +12,7 @@ import BaseUISchema from 'sources/SchemaView/base_schema.ui';
import OptionsSchema from '../../../../../static/js/options.ui'; import OptionsSchema from '../../../../../static/js/options.ui';
export default class ForeignServerSchema extends BaseUISchema { export default class ForeignServerSchema extends BaseUISchema {
constructor(getPrivilegeRoleSchema, fieldOptions={}, initValues) { constructor(getPrivilegeRoleSchema, fieldOptions={}, initValues={}) {
super({ super({
name: undefined, name: undefined,
fsrvtype: undefined, fsrvtype: undefined,
@ -83,4 +83,4 @@ export default class ForeignServerSchema extends BaseUISchema {
} }
]; ];
} }
} }

View File

@ -12,7 +12,7 @@ import BaseUISchema from 'sources/SchemaView/base_schema.ui';
import OptionsSchema from '../../../../../../static/js/options.ui'; import OptionsSchema from '../../../../../../static/js/options.ui';
export default class UserMappingSchema extends BaseUISchema { export default class UserMappingSchema extends BaseUISchema {
constructor(fieldOptions={}, initValues) { constructor(fieldOptions={}, initValues={}) {
super({ super({
name: undefined, name: undefined,
is_sys_obj: undefined, is_sys_obj: undefined,
@ -53,4 +53,4 @@ export default class UserMappingSchema extends BaseUISchema {
} }
]; ];
} }
} }

View File

@ -12,7 +12,7 @@ import BaseUISchema from 'sources/SchemaView/base_schema.ui';
import OptionsSchema from '../../../../static/js/options.ui'; import OptionsSchema from '../../../../static/js/options.ui';
export default class ForeignDataWrapperSchema extends BaseUISchema { export default class ForeignDataWrapperSchema extends BaseUISchema {
constructor(getPrivilegeRoleSchema, fieldOptions={}, initValues) { constructor(getPrivilegeRoleSchema, fieldOptions={}, initValues={}) {
super({ super({
name: undefined, name: undefined,
fdwowner: undefined, fdwowner: undefined,

View File

@ -13,7 +13,7 @@ import SecLabelSchema from '../../../../static/js/sec_label.ui';
import _ from 'lodash'; import _ from 'lodash';
export default class LanguageSchema extends BaseUISchema { export default class LanguageSchema extends BaseUISchema {
constructor(getPrivilegeRoleSchema, fieldOptions={}, node_info, initValues) { constructor(getPrivilegeRoleSchema, fieldOptions={}, node_info={}, initValues={}) {
super({ super({
name: undefined, name: undefined,
lanowner: (node_info) ? node_info['node_info'].user.name: undefined, lanowner: (node_info) ? node_info['node_info'].user.name: undefined,

View File

@ -56,7 +56,7 @@ export class DefaultWithSchema extends BaseUISchema {
} }
export default class PublicationSchema extends BaseUISchema { export default class PublicationSchema extends BaseUISchema {
constructor(fieldOptions={}, node_info, initValues) { constructor(fieldOptions={}, node_info={}, initValues={}) {
super({ super({
name: undefined, name: undefined,
pubowner: (node_info) ? node_info['node_info'].user.name: undefined, pubowner: (node_info) ? node_info['node_info'].user.name: undefined,

View File

@ -11,7 +11,7 @@ import BaseUISchema from 'sources/SchemaView/base_schema.ui';
import gettext from 'sources/gettext'; import gettext from 'sources/gettext';
export default class AggregateSchema extends BaseUISchema { export default class AggregateSchema extends BaseUISchema {
constructor(fieldOptions = {},initValues) { constructor(fieldOptions = {},initValues={}) {
super({ super({
name: undefined, name: undefined,
oid: undefined, oid: undefined,

View File

@ -12,7 +12,7 @@ import BaseUISchema from 'sources/SchemaView/base_schema.ui';
export default class CatalogObjectColumnSchema extends BaseUISchema { export default class CatalogObjectColumnSchema extends BaseUISchema {
constructor(fieldOptions={}, initValues) { constructor(fieldOptions={}, initValues={}) {
super({ super({
attname: undefined, attname: undefined,
attowner: undefined, attowner: undefined,

View File

@ -12,7 +12,7 @@ import gettext from 'sources/gettext';
import { isEmptyString } from 'sources/validators'; import { isEmptyString } from 'sources/validators';
export default class CollationSchema extends BaseUISchema { export default class CollationSchema extends BaseUISchema {
constructor(fieldOptions = {},initValues) { constructor(fieldOptions = {},initValues={}) {
super({ super({
name: undefined, name: undefined,
oid: undefined, oid: undefined,

View File

@ -67,7 +67,7 @@ export class DomainConstSchema extends BaseUISchema {
} }
export default class DomainSchema extends BaseUISchema { export default class DomainSchema extends BaseUISchema {
constructor(fieldOptions={}, initValues) { constructor(fieldOptions={}, initValues={}) {
super({ super({
name: undefined, name: undefined,
oid: undefined, oid: undefined,

View File

@ -19,7 +19,7 @@ import { getNodeAjaxOptions } from '../../../../../../../static/js/node_ajax';
export default class ForeignTableSchema extends BaseUISchema { export default class ForeignTableSchema extends BaseUISchema {
constructor(getPrivilegeRoleSchema, getVariableSchema, getColumns, fieldOptions={}, initValues) { constructor(getPrivilegeRoleSchema, getVariableSchema, getColumns, fieldOptions={}, initValues={}) {
super({ super({
name: undefined, name: undefined,
oid: undefined, oid: undefined,

View File

@ -67,7 +67,7 @@ class TokenSchema extends BaseUISchema {
} }
export default class FTSConfigurationSchema extends BaseUISchema { export default class FTSConfigurationSchema extends BaseUISchema {
constructor(fieldOptions={}, initValues) { constructor(fieldOptions={}, initValues={}) {
super({ super({
name: undefined, // FTS Configuration name name: undefined, // FTS Configuration name
owner: undefined, // FTS Configuration owner owner: undefined, // FTS Configuration owner

View File

@ -12,7 +12,7 @@ import BaseUISchema from 'sources/SchemaView/base_schema.ui';
import OptionsSchema from '../../../../../static/js/options.ui'; import OptionsSchema from '../../../../../static/js/options.ui';
export default class FTSDictionarySchema extends BaseUISchema { export default class FTSDictionarySchema extends BaseUISchema {
constructor(fieldOptions={}, initValues) { constructor(fieldOptions={}, initValues={}) {
super({ super({
name: undefined, // FTS Dictionary name name: undefined, // FTS Dictionary name
owner: undefined, // FTS Dictionary owner owner: undefined, // FTS Dictionary owner

View File

@ -11,7 +11,7 @@ import gettext from 'sources/gettext';
import BaseUISchema from 'sources/SchemaView/base_schema.ui'; import BaseUISchema from 'sources/SchemaView/base_schema.ui';
export default class FTSParserSchema extends BaseUISchema { export default class FTSParserSchema extends BaseUISchema {
constructor(fieldOptions = {}, initValues) { constructor(fieldOptions = {}, initValues={}) {
super({ super({
name: null, name: null,
oid: undefined, oid: undefined,

View File

@ -11,7 +11,7 @@ import gettext from 'sources/gettext';
import BaseUISchema from 'sources/SchemaView/base_schema.ui'; import BaseUISchema from 'sources/SchemaView/base_schema.ui';
export default class FTSTemplateSchema extends BaseUISchema { export default class FTSTemplateSchema extends BaseUISchema {
constructor(fieldOptions = {}, initValues) { constructor(fieldOptions = {}, initValues={}) {
super({ super({
name: null, name: null,
oid: undefined, oid: undefined,

View File

@ -94,7 +94,7 @@ export class DefaultArgumentSchema extends BaseUISchema {
} }
export default class FunctionSchema extends BaseUISchema { export default class FunctionSchema extends BaseUISchema {
constructor(getPrivilegeRoleSchema, getNodeVariableSchema, fieldOptions={}, node_info, type, initValues) { constructor(getPrivilegeRoleSchema, getNodeVariableSchema, fieldOptions={}, node_info={}, type='function', initValues={}) {
super({ super({
name: undefined, name: undefined,
oid: undefined, oid: undefined,

View File

@ -14,7 +14,7 @@ import { isEmptyString } from 'sources/validators';
export default class TriggerFunctionSchema extends BaseUISchema { export default class TriggerFunctionSchema extends BaseUISchema {
constructor(getPrivilegeRoleSchema, getVariableSchema, fieldOptions={}, initValues) { constructor(getPrivilegeRoleSchema, getVariableSchema, fieldOptions={}, initValues={}) {
super({ super({
name: null, name: null,
oid: null, oid: null,

View File

@ -11,7 +11,7 @@ import BaseUISchema from 'sources/SchemaView/base_schema.ui';
import gettext from 'sources/gettext'; import gettext from 'sources/gettext';
export default class OperatorSchema extends BaseUISchema { export default class OperatorSchema extends BaseUISchema {
constructor(fieldOptions = {},initValues) { constructor(fieldOptions = {},initValues={}) {
super({ super({
name: undefined, name: undefined,
oid: undefined, oid: undefined,

View File

@ -11,7 +11,7 @@ import gettext from 'sources/gettext';
import BaseUISchema from 'sources/SchemaView/base_schema.ui'; import BaseUISchema from 'sources/SchemaView/base_schema.ui';
export default class EDBFuncSchema extends BaseUISchema { export default class EDBFuncSchema extends BaseUISchema {
constructor(fieldOptions = {}, initValues) { constructor(fieldOptions = {}, initValues={}) {
super({ super({
name: undefined, name: undefined,
oid: undefined, oid: undefined,

View File

@ -11,7 +11,7 @@ import gettext from 'sources/gettext';
import BaseUISchema from 'sources/SchemaView/base_schema.ui'; import BaseUISchema from 'sources/SchemaView/base_schema.ui';
export default class EDBVarSchema extends BaseUISchema { export default class EDBVarSchema extends BaseUISchema {
constructor(fieldOptions = {}, initValues) { constructor(fieldOptions = {}, initValues={}) {
super({ super({
name: undefined, name: undefined,
oid: undefined, oid: undefined,

View File

@ -12,7 +12,7 @@ import BaseUISchema from 'sources/SchemaView/base_schema.ui';
import { isEmptyString } from 'sources/validators'; import { isEmptyString } from 'sources/validators';
export default class PackageSchema extends BaseUISchema { export default class PackageSchema extends BaseUISchema {
constructor(getPrivilegeRoleSchema, fieldOptions = {}, initValues) { constructor(getPrivilegeRoleSchema, fieldOptions = {}, initValues={}) {
super({ super({
name: undefined, name: undefined,
oid: undefined, oid: undefined,

View File

@ -68,7 +68,7 @@ export class OwnedBySchema extends BaseUISchema {
export default class SequenceSchema extends BaseUISchema { export default class SequenceSchema extends BaseUISchema {
constructor(getPrivilegeRoleSchema, fieldOptions={}, initValues) { constructor(getPrivilegeRoleSchema, fieldOptions={}, initValues={}) {
super({ super({
name: undefined, name: undefined,
oid: undefined, oid: undefined,

View File

@ -11,7 +11,7 @@ import gettext from 'sources/gettext';
import BaseUISchema from 'sources/SchemaView/base_schema.ui'; import BaseUISchema from 'sources/SchemaView/base_schema.ui';
export default class CatalogSchema extends BaseUISchema { export default class CatalogSchema extends BaseUISchema {
constructor(fieldOptions = {}, initValues) { constructor(fieldOptions = {}, initValues={}) {
super({ super({
name: undefined, name: undefined,
namespaceowner: undefined, namespaceowner: undefined,

View File

@ -14,7 +14,7 @@ import SecLabelSchema from '../../../../static/js/sec_label.ui';
import { isEmptyString } from 'sources/validators'; import { isEmptyString } from 'sources/validators';
export default class PGSchema extends BaseUISchema { export default class PGSchema extends BaseUISchema {
constructor(getPrivilegeRoleSchema, fieldOptions = {}, initValues) { constructor(getPrivilegeRoleSchema, fieldOptions = {}, initValues={}) {
super({ super({
name: undefined, name: undefined,
namespaceowner: undefined, namespaceowner: undefined,

View File

@ -12,7 +12,7 @@ import BaseUISchema from 'sources/SchemaView/base_schema.ui';
import { emptyValidator } from 'sources/validators'; import { emptyValidator } from 'sources/validators';
export default class SynonymSchema extends BaseUISchema { export default class SynonymSchema extends BaseUISchema {
constructor(fieldOptions={}, nodeInfo, initValues) { constructor(fieldOptions={}, nodeInfo={}, initValues={}) {
super({ super({
targettype: 'r', targettype: 'r',
...initValues, ...initValues,

View File

@ -13,7 +13,7 @@ import { isEmptyString } from 'sources/validators';
export class ForEventsSchema extends BaseUISchema { export class ForEventsSchema extends BaseUISchema {
constructor(fieldOptions={}, nodeInfo, initValues) { constructor(fieldOptions={}, nodeInfo={}, initValues={}) {
super({ super({
...initValues, ...initValues,
}); });
@ -73,7 +73,7 @@ export class ForEventsSchema extends BaseUISchema {
} }
export default class CompoundTriggerSchema extends BaseUISchema { export default class CompoundTriggerSchema extends BaseUISchema {
constructor(fieldOptions={}, nodeInfo, initValues) { constructor(fieldOptions={}, nodeInfo={}, initValues={}) {
super({ super({
name: undefined, name: undefined,
...initValues, ...initValues,

View File

@ -186,7 +186,7 @@ class ExclusionColumnSchema extends BaseUISchema {
} }
export default class ExclusionConstraintSchema extends BaseUISchema { export default class ExclusionConstraintSchema extends BaseUISchema {
constructor(fieldOptions={}, nodeInfo) { constructor(fieldOptions={}, nodeInfo={}) {
super({ super({
name: undefined, name: undefined,
oid: undefined, oid: undefined,

View File

@ -118,7 +118,7 @@ export class ForeignKeyColumnSchema extends BaseUISchema {
} }
export default class ForeignKeySchema extends BaseUISchema { export default class ForeignKeySchema extends BaseUISchema {
constructor(fieldOptions={}, nodeInfo, getColumns, initValues={}, inErd=false) { constructor(fieldOptions={}, nodeInfo={}, getColumns=()=>[], initValues={}, inErd=false) {
super({ super({
name: undefined, name: undefined,
reftab: undefined, reftab: undefined,

View File

@ -5,7 +5,7 @@ import { isEmptyString } from 'sources/validators';
import { SCHEMA_STATE_ACTIONS } from '../../../../../../../../../../static/js/SchemaView'; import { SCHEMA_STATE_ACTIONS } from '../../../../../../../../../../static/js/SchemaView';
import TableSchema from '../../../../static/js/table.ui'; import TableSchema from '../../../../static/js/table.ui';
export default class PrimaryKeySchema extends BaseUISchema { export default class PrimaryKeySchema extends BaseUISchema {
constructor(fieldOptions={}, nodeInfo) { constructor(fieldOptions={}, nodeInfo={}) {
super({ super({
name: undefined, name: undefined,
oid: undefined, oid: undefined,

View File

@ -6,7 +6,7 @@ import { SCHEMA_STATE_ACTIONS } from '../../../../../../../../../../static/js/Sc
import TableSchema from '../../../../static/js/table.ui'; import TableSchema from '../../../../static/js/table.ui';
export default class UniqueConstraintSchema extends BaseUISchema { export default class UniqueConstraintSchema extends BaseUISchema {
constructor(fieldOptions={}, nodeInfo) { constructor(fieldOptions={}, nodeInfo={}) {
super({ super({
name: undefined, name: undefined,
oid: undefined, oid: undefined,

View File

@ -27,7 +27,7 @@ export function getColumnSchema(nodeObj, treeNodeInfo, itemNodeData) {
} }
export class ColumnSchema extends BaseUISchema { export class ColumnSchema extends BaseUISchema {
constructor(fieldOptions = {}, nodeData, initValues) { constructor(fieldOptions = {}, nodeData, initValues={}) {
super({ super({
name: null, name: null,
oid: undefined, oid: undefined,
@ -209,7 +209,7 @@ function inSchema(node_info) {
} }
export default class IndexSchema extends BaseUISchema { export default class IndexSchema extends BaseUISchema {
constructor(getColumnSchema, fieldOptions = {}, nodeData, initValues) { constructor(getColumnSchema, fieldOptions = {}, nodeData, initValues={}) {
super({ super({
name: undefined, name: undefined,
oid: undefined, oid: undefined,

View File

@ -72,8 +72,8 @@ export function getNodePartitionTableSchema(treeNodeInfo, itemNodeData, pgBrowse
} }
export default class PartitionTableSchema extends BaseUISchema { export default class PartitionTableSchema extends BaseUISchema {
constructor(fieldOptions={}, nodeInfo, schemas, getPrivilegeRoleSchema, getColumns, constructor(fieldOptions={}, nodeInfo={}, schemas={}, getPrivilegeRoleSchema={}, getColumns=()=>[],
getCollations, getOperatorClass, getAttachTables, initValues) { getCollations=()=>[], getOperatorClass=()=>[], getAttachTables=()=>[], initValues={}) {
super({ super({
name: undefined, name: undefined,
oid: undefined, oid: undefined,

View File

@ -12,7 +12,7 @@ import BaseUISchema from 'sources/SchemaView/base_schema.ui';
export default class RowSecurityPolicySchema extends BaseUISchema { export default class RowSecurityPolicySchema extends BaseUISchema {
constructor(fieldOptions={}, initValues) { constructor(fieldOptions={}, initValues={}) {
super({ super({
name: undefined, name: undefined,
policyowner: 'public', policyowner: 'public',

View File

@ -284,7 +284,7 @@ export class LikeSchema extends BaseUISchema {
} }
export default class TableSchema extends BaseUISchema { export default class TableSchema extends BaseUISchema {
constructor(fieldOptions={}, nodeInfo, schemas={}, getPrivilegeRoleSchema=()=>{/*This is intentional (SonarQube)*/}, getColumns=()=>[], constructor(fieldOptions={}, nodeInfo={}, schemas={}, getPrivilegeRoleSchema=()=>{/*This is intentional (SonarQube)*/}, getColumns=()=>[],
getCollations=()=>[], getOperatorClass=()=>[], getAttachTables=()=>[], initValues={}, inErd=false) { getCollations=()=>[], getOperatorClass=()=>[], getAttachTables=()=>[], initValues={}, inErd=false) {
super({ super({
name: undefined, name: undefined,

View File

@ -12,7 +12,7 @@ import BaseUISchema from 'sources/SchemaView/base_schema.ui';
import { isEmptyString } from 'sources/validators'; import { isEmptyString } from 'sources/validators';
export class EventSchema extends BaseUISchema { export class EventSchema extends BaseUISchema {
constructor(fieldOptions={}, initValues) { constructor(fieldOptions={}, initValues={}) {
super({ super({
evnt_update: false, evnt_update: false,
evnt_insert: false, evnt_insert: false,
@ -119,7 +119,7 @@ export class EventSchema extends BaseUISchema {
export default class TriggerSchema extends BaseUISchema { export default class TriggerSchema extends BaseUISchema {
constructor(fieldOptions={}, initValues) { constructor(fieldOptions={}, initValues={}) {
super({ super({
name: undefined, name: undefined,
is_row_trigger: true, is_row_trigger: true,

View File

@ -173,7 +173,7 @@ class EnumerationSchema extends BaseUISchema {
} }
class RangeSchema extends BaseUISchema { class RangeSchema extends BaseUISchema {
constructor(fieldOptions = {}, node_info, initValues) { constructor(fieldOptions = {}, node_info={}, initValues={}) {
super({ super({
typname: null, typname: null,
oid: undefined, oid: undefined,
@ -412,7 +412,7 @@ class RangeSchema extends BaseUISchema {
} }
class ExternalSchema extends BaseUISchema { class ExternalSchema extends BaseUISchema {
constructor(fieldOptions = {}, node_info, initValues) { constructor(fieldOptions = {}, node_info={}, initValues={}) {
super({ super({
name: null, name: null,
typinput: undefined, typinput: undefined,
@ -872,7 +872,7 @@ class ExternalSchema extends BaseUISchema {
} }
class CompositeSchema extends BaseUISchema { class CompositeSchema extends BaseUISchema {
constructor(fieldOptions = {}, initValues) { constructor(fieldOptions = {}, initValues={}) {
super({ super({
oid: undefined, oid: undefined,
is_sys_type: false, is_sys_type: false,
@ -1065,7 +1065,7 @@ class CompositeSchema extends BaseUISchema {
class DataTypeSchema extends BaseUISchema { class DataTypeSchema extends BaseUISchema {
constructor(fieldOptions = {}, initValues) { constructor(fieldOptions = {}, initValues={}) {
super({ super({
oid: undefined, oid: undefined,
is_sys_type: false, is_sys_type: false,
@ -1271,7 +1271,7 @@ class DataTypeSchema extends BaseUISchema {
} }
export default class TypeSchema extends BaseUISchema { export default class TypeSchema extends BaseUISchema {
constructor(getPrivilegeRoleSchema, getCompositeSchema, getRangeSchema, getExternalSchema, getDataTypeSchema, fieldOptions = {}, initValues) { constructor(getPrivilegeRoleSchema, getCompositeSchema, getRangeSchema, getExternalSchema, getDataTypeSchema, fieldOptions = {}, initValues={}) {
super({ super({
name: null, name: null,
oid: undefined, oid: undefined,

View File

@ -14,7 +14,7 @@ import { isEmptyString } from 'sources/validators';
export default class MViewSchema extends BaseUISchema { export default class MViewSchema extends BaseUISchema {
constructor(getPrivilegeRoleSchema, getVacuumSettingsSchema, fieldOptions={}, initValues) { constructor(getPrivilegeRoleSchema, getVacuumSettingsSchema, fieldOptions={}, initValues={}) {
super({ super({
spcname: undefined, spcname: undefined,
toast_autovacuum_enabled: 'x', toast_autovacuum_enabled: 'x',

View File

@ -14,7 +14,7 @@ import { isEmptyString } from 'sources/validators';
export default class ViewSchema extends BaseUISchema { export default class ViewSchema extends BaseUISchema {
constructor(getPrivilegeRoleSchema, nodeInfo, fieldOptions={}, initValues) { constructor(getPrivilegeRoleSchema, nodeInfo, fieldOptions={}, initValues={}) {
super({ super({
owner: undefined, owner: undefined,
schema: undefined, schema: undefined,

View File

@ -47,7 +47,7 @@ export class DefaultPrivSchema extends BaseUISchema {
} }
export default class DatabaseSchema extends BaseUISchema { export default class DatabaseSchema extends BaseUISchema {
constructor(getVariableSchema, getPrivilegeRoleSchema, fieldOptions={}, initValues) { constructor(getVariableSchema, getPrivilegeRoleSchema, fieldOptions={}, initValues={}) {
super({ super({
name: undefined, name: undefined,
owner: undefined, owner: undefined,

View File

@ -12,7 +12,7 @@ import { isEmptyString } from 'sources/validators';
import _ from 'lodash'; import _ from 'lodash';
export default class SubscriptionSchema extends BaseUISchema{ export default class SubscriptionSchema extends BaseUISchema{
constructor(fieldOptions={}, node_info, initValues) { constructor(fieldOptions={}, node_info={}, initValues={}) {
super({ super({
name: undefined, name: undefined,
subowner: undefined, subowner: undefined,

View File

@ -74,7 +74,7 @@ const weekdays = [
]; ];
export class ExceptionsSchema extends BaseUISchema { export class ExceptionsSchema extends BaseUISchema {
constructor(fieldOptions={}, initValues) { constructor(fieldOptions={}, initValues={}) {
super({ super({
jexdate: null, jexdate: null,
jextime: null, jextime: null,
@ -159,7 +159,7 @@ const BooleanArrayFormatter = {
}; };
export class DaysSchema extends BaseUISchema { export class DaysSchema extends BaseUISchema {
constructor(fieldOptions={}, initValues) { constructor(fieldOptions={}, initValues={}) {
super({ super({
...initValues, ...initValues,
}); });
@ -201,7 +201,7 @@ export class DaysSchema extends BaseUISchema {
} }
export class TimesSchema extends BaseUISchema { export class TimesSchema extends BaseUISchema {
constructor(fieldOptions={}, initValues) { constructor(fieldOptions={}, initValues={}) {
super({ super({
...initValues, ...initValues,
}); });
@ -235,7 +235,7 @@ export class TimesSchema extends BaseUISchema {
} }
export default class PgaJobScheduleSchema extends BaseUISchema { export default class PgaJobScheduleSchema extends BaseUISchema {
constructor(fieldOptions={}, initValues) { constructor(fieldOptions={}, initValues={}) {
super({ super({
jscid: null, jscid: null,
jscjobid: null, jscjobid: null,

View File

@ -12,7 +12,7 @@ import BaseUISchema from 'sources/SchemaView/base_schema.ui';
import PgaJobScheduleSchema from '../../schedules/static/js/pga_schedule.ui'; import PgaJobScheduleSchema from '../../schedules/static/js/pga_schedule.ui';
export default class PgaJobSchema extends BaseUISchema { export default class PgaJobSchema extends BaseUISchema {
constructor(fieldOptions={}, getPgaJobStepSchema, initValues) { constructor(fieldOptions={}, getPgaJobStepSchema=()=>[], initValues={}) {
super({ super({
jobname: '', jobname: '',
jobid: undefined, jobid: undefined,

View File

@ -26,7 +26,7 @@ export function getNodePgaJobStepSchema(treeNodeInfo, itemNodeData) {
); );
} }
export default class PgaJobStepSchema extends BaseUISchema { export default class PgaJobStepSchema extends BaseUISchema {
constructor(fieldOptions={}, initValues) { constructor(fieldOptions={}, initValues={}) {
super({ super({
jstid: null, jstid: null,
jstjobid: null, jstjobid: null,

View File

@ -19,7 +19,7 @@ import current_user from 'pgadmin.user_management.current_user';
import { isEmptyString } from 'sources/validators'; import { isEmptyString } from 'sources/validators';
export default class ServerSchema extends BaseUISchema { export default class ServerSchema extends BaseUISchema {
constructor(serverGroupOptions=[], userId, initValues) { constructor(serverGroupOptions=[], userId, initValues={}) {
super({ super({
gid: undefined, gid: undefined,
id: undefined, id: undefined,

View File

@ -12,7 +12,7 @@ import BaseUISchema from 'sources/SchemaView/base_schema.ui';
import SecLabelSchema from '../../../static/js/sec_label.ui'; import SecLabelSchema from '../../../static/js/sec_label.ui';
export default class TablespaceSchema extends BaseUISchema { export default class TablespaceSchema extends BaseUISchema {
constructor(getVariableSchema, getPrivilegeRoleSchema, fieldOptions={}, initValues) { constructor(getVariableSchema, getPrivilegeRoleSchema, fieldOptions={}, initValues={}) {
super({ super({
name: undefined, name: undefined,
owner: undefined, owner: undefined,

View File

@ -11,7 +11,7 @@ import BaseUISchema from 'sources/SchemaView/base_schema.ui';
import { isEmptyString } from 'sources/validators'; import { isEmptyString } from 'sources/validators';
export class SectionSchema extends BaseUISchema { export class SectionSchema extends BaseUISchema {
constructor(fieldOptions={}, initValues) { constructor(fieldOptions={}, initValues={}) {
super({ super({
...initValues, ...initValues,
}); });
@ -131,7 +131,7 @@ export function getTypeObjSchema(fieldOptions) {
} }
export class SaveOptSchema extends BaseUISchema { export class SaveOptSchema extends BaseUISchema {
constructor(fieldOptions={}, initValues) { constructor(fieldOptions={}, initValues={}) {
super({ super({
id: null, id: null,
...initValues, ...initValues,
@ -194,7 +194,7 @@ export function getSaveOptSchema(fieldOptions) {
} }
export class QueryOptionSchema extends BaseUISchema { export class QueryOptionSchema extends BaseUISchema {
constructor(fieldOptions={}, initValues) { constructor(fieldOptions={}, initValues={}) {
super({ super({
id: null, id: null,
...initValues, ...initValues,
@ -274,7 +274,7 @@ export function getQueryOptionSchema(fieldOptions) {
} }
export class DisabledOptionSchema extends BaseUISchema { export class DisabledOptionSchema extends BaseUISchema {
constructor(fieldOptions={}, initValues) { constructor(fieldOptions={}, initValues={}) {
super({ super({
id: null, id: null,
...initValues, ...initValues,
@ -316,7 +316,7 @@ export function getDisabledOptionSchema(fieldOptions) {
} }
export class MiscellaneousSchema extends BaseUISchema { export class MiscellaneousSchema extends BaseUISchema {
constructor(fieldOptions={}, initValues) { constructor(fieldOptions={}, initValues={}) {
super({ super({
id: null, id: null,
verbose: true, verbose: true,

View File

@ -2,7 +2,7 @@ import gettext from 'sources/gettext';
import BaseUISchema from 'sources/SchemaView/base_schema.ui'; import BaseUISchema from 'sources/SchemaView/base_schema.ui';
export default class PrivilegeSchema extends BaseUISchema { export default class PrivilegeSchema extends BaseUISchema {
constructor(getPrivilegeRoleSchema, fieldOptions = {}, initValues) { constructor(getPrivilegeRoleSchema, fieldOptions = {}, initValues={}) {
super({ super({
oid: null, oid: null,
privilege: [], privilege: [],

View File

@ -136,7 +136,7 @@ export function getRestoreTypeObjSchema(fieldOptions) {
} }
export class RestoreSaveOptSchema extends BaseUISchema { export class RestoreSaveOptSchema extends BaseUISchema {
constructor(fieldOptions={}, initValues) { constructor(fieldOptions={}, initValues={}) {
super({ super({
id: null, id: null,
...initValues, ...initValues,
@ -192,7 +192,7 @@ export function getRestoreSaveOptSchema(fieldOptions) {
} }
export class RestoreQueryOptionSchema extends BaseUISchema { export class RestoreQueryOptionSchema extends BaseUISchema {
constructor(fieldOptions={}, initValues) { constructor(fieldOptions={}, initValues={}) {
super({ super({
id: null, id: null,
...initValues, ...initValues,
@ -245,7 +245,7 @@ export function getRestoreQueryOptionSchema(fieldOptions) {
} }
export class RestoreDisableOptionSchema extends BaseUISchema { export class RestoreDisableOptionSchema extends BaseUISchema {
constructor(fieldOptions={}, initValues) { constructor(fieldOptions={}, initValues={}) {
super({ super({
id: null, id: null,
...initValues, ...initValues,
@ -284,7 +284,7 @@ export function getRestoreDisableOptionSchema(fieldOptions) {
} }
export class RestoreMiscellaneousSchema extends BaseUISchema { export class RestoreMiscellaneousSchema extends BaseUISchema {
constructor(fieldOptions={}, initValues) { constructor(fieldOptions={}, initValues={}) {
super({ super({
id: null, id: null,
verbose: true, verbose: true,
@ -465,4 +465,4 @@ export default class RestoreSchema extends BaseUISchema {
} }
} }
} }
} }

View File

@ -76,9 +76,9 @@ RECORD_ARRAY = (2287,)
# #
# For below two sql psycopg2 returns result in different formats. # For below two sql psycopg2 returns result in different formats.
# SELECT '{foo,bar}'::text[]; # SELECT '{foo,bar}'::text[];
# print('type of {} ==> {/*This is intentional (SonarQube)*/}'.format(res[0], type(res[0]))) # print('type of {} ==> {}'.format(res[0], type(res[0])))
# SELECT '{<a>foo</a>,<b>bar</b>}'::xml[]; # SELECT '{<a>foo</a>,<b>bar</b>}'::xml[];
# print('type of {} ==> {/*This is intentional (SonarQube)*/}'.format(res[0], type(res[0]))) # print('type of {} ==> {}'.format(res[0], type(res[0])))
# #
# Output: # Output:
# type of ['foo', 'bar'] ==> <type 'list'> # type of ['foo', 'bar'] ==> <type 'list'>