mirror of https://github.com/Fabio286/antares.git
fix: bigint support, closes #197
This commit is contained in:
parent
ddee68b4c2
commit
b7039553cc
|
@ -134,7 +134,7 @@ export default class {
|
||||||
{ name: 'phoneNumberFormat', group: 'phone', types: ['string'] },
|
{ name: 'phoneNumberFormat', group: 'phone', types: ['string'] },
|
||||||
{ name: 'phoneFormats', group: 'phone', types: ['string'] },
|
{ name: 'phoneFormats', group: 'phone', types: ['string'] },
|
||||||
|
|
||||||
{ name: 'number', group: 'datatype', types: ['string', 'number'], params: ['min', 'max'] },
|
{ name: 'number', group: 'random', types: ['string', 'number'], params: ['min', 'max'] },
|
||||||
{ name: 'float', group: 'random', types: ['string', 'float'], params: ['min', 'max'] },
|
{ name: 'float', group: 'random', types: ['string', 'float'], params: ['min', 'max'] },
|
||||||
{ name: 'arrayElement', group: 'random', types: ['string'] },
|
{ name: 'arrayElement', group: 'random', types: ['string'] },
|
||||||
{ name: 'arrayElements', group: 'random', types: ['string'] },
|
{ name: 'arrayElements', group: 'random', types: ['string'] },
|
||||||
|
|
|
@ -114,7 +114,9 @@ export class MySQLClient extends AntaresCore {
|
||||||
port: this._params.port,
|
port: this._params.port,
|
||||||
user: this._params.user,
|
user: this._params.user,
|
||||||
password: this._params.password,
|
password: this._params.password,
|
||||||
ssl: null
|
ssl: null,
|
||||||
|
supportBigNumbers: true,
|
||||||
|
bigNumberStrings: true
|
||||||
};
|
};
|
||||||
|
|
||||||
if (this._params.schema?.length) dbConfig.database = this._params.schema;
|
if (this._params.schema?.length) dbConfig.database = this._params.schema;
|
||||||
|
|
|
@ -9,7 +9,6 @@ function pgToString (value) {
|
||||||
return value.toString();
|
return value.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
types.setTypeParser(20, a => parseInt(a));// bigint string to number
|
|
||||||
types.setTypeParser(1082, pgToString); // date
|
types.setTypeParser(1082, pgToString); // date
|
||||||
types.setTypeParser(1083, pgToString); // time
|
types.setTypeParser(1083, pgToString); // time
|
||||||
types.setTypeParser(1114, pgToString); // timestamp
|
types.setTypeParser(1114, pgToString); // timestamp
|
||||||
|
|
|
@ -163,7 +163,7 @@ export class SQLiteClient extends AntaresCore {
|
||||||
nullable: !field.notnull,
|
nullable: !field.notnull,
|
||||||
unsigned: null,
|
unsigned: null,
|
||||||
zerofill: null,
|
zerofill: null,
|
||||||
order: field.cid + 1,
|
order: typeof field.cid === 'string' ? +field.cid + 1 : field.cid + 1,
|
||||||
default: field.dflt_value,
|
default: field.dflt_value,
|
||||||
charset: null,
|
charset: null,
|
||||||
collation: null,
|
collation: null,
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
@blur="$emit('blur')"
|
@blur="$emit('blur')"
|
||||||
>
|
>
|
||||||
<option v-if="!isValidDefault" :value="value">
|
<option v-if="!isValidDefault" :value="value">
|
||||||
{{ value }} - {{ $t('message.invalidDefault') }}
|
{{ value === null ? 'NULL' : value }}
|
||||||
</option>
|
</option>
|
||||||
<option
|
<option
|
||||||
v-for="row in foreignList"
|
v-for="row in foreignList"
|
||||||
|
|
Loading…
Reference in New Issue