mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-18 00:56:02 +00:00
fixed replicator for oracle
This commit is contained in:
@@ -300,6 +300,7 @@ describe('Data replicator', () => {
|
|||||||
DB1.role_permissions.splice(1, 1);
|
DB1.role_permissions.splice(1, 1);
|
||||||
await dataReplicator(createDuplConfig(DB1));
|
await dataReplicator(createDuplConfig(DB1));
|
||||||
expect(await queryValue(`select count(*) as ~val from ~role_permissions`)).toEqual('2');
|
expect(await queryValue(`select count(*) as ~val from ~role_permissions`)).toEqual('2');
|
||||||
})
|
}),
|
||||||
|
15 * 1000
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -130,7 +130,8 @@ class ReplicatorItemHolder {
|
|||||||
const ref = this.refByColumn[key];
|
const ref = this.refByColumn[key];
|
||||||
if (ref) {
|
if (ref) {
|
||||||
// remap id
|
// remap id
|
||||||
res[key] = ref.ref.idMap[res[key]];
|
const oldId = res[key];
|
||||||
|
res[key] = ref.ref.idMap[oldId];
|
||||||
if (ref.isMandatory && res[key] == null) {
|
if (ref.isMandatory && res[key] == null) {
|
||||||
// mandatory refertence not matched
|
// mandatory refertence not matched
|
||||||
if (this.replicator.options.skipRowsWithUnresolvedRefs) {
|
if (this.replicator.options.skipRowsWithUnresolvedRefs) {
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ export function isTypeNumeric(dataType) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export function isTypeFloat(dataType) {
|
export function isTypeFloat(dataType) {
|
||||||
return dataType && /float|single|double/i.test(dataType);
|
return dataType && /float|single|double|number/i.test(dataType);
|
||||||
}
|
}
|
||||||
|
|
||||||
export function isTypeNumber(dataType) {
|
export function isTypeNumber(dataType) {
|
||||||
|
|||||||
Reference in New Issue
Block a user