forked from typeorm/typeorm
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: resolve issues ora-00972:identifier is too long (typeorm#6751)
* fix: resolve issues ora-00972:identifier is too long Closes: typeorm#5067 * fix: ensure that this changes applies just for Oracle Driver Closes: typeorm#5067 * fix test - remove `.only` & set the `enabledDrivers` to oracle * simplify test case Co-authored-by: Murat Gundes <guendes.murat@indivumed.com>
- Loading branch information
1 parent
bf80aac
commit d8a8d89
Showing
2 changed files
with
21 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import "reflect-metadata"; | ||
import {expect} from "chai"; | ||
import {Connection} from "../../../src"; | ||
import {closeTestingConnections, createTestingConnections} from "../../utils/test-utils"; | ||
|
||
describe("github issues > #5067 ORA-00972: identifier is too long", () => { | ||
let connections: Connection[]; | ||
before(async () => connections = await createTestingConnections({ | ||
enabledDrivers: ["oracle"] | ||
})); | ||
after(() => closeTestingConnections(connections)); | ||
|
||
it("generated parameter name is within the size constraints", () => Promise.all(connections.map(async connection => { | ||
const paramName = "output_that_is_really_long_and_must_be_truncated_in_this_driver"; | ||
const createdParameter = await connection.driver.createParameter(paramName, 0); | ||
|
||
expect(createdParameter).to.be.an("String"); | ||
expect(createdParameter.length).to.be.lessThan(30); | ||
}))); | ||
}); |