MCPcopy Index your code
hub / github.com/dataease/SQLBot / identify

Method identify

frontend/public/swagger-ui-bundle.js:52852–52863  ·  view source on GitHub ↗
(s)

Source from the content-addressed store, hash-verified

52850 constructor({ length: s = 6 } = {}) {
52851 ;((this.uuid = new Kw({ length: s })), (this.identityMap = new WeakMap()))
52852 }
52853 identify(s) {
52854 if (!Cu(s))
52855 throw new Gw(
52856 'Cannot not identify the element. `element` is neither structurally compatible nor a subclass of an Element class.',
52857 { value: s }
52858 )
52859 if (s.meta.hasKey('id') && ju(s.meta.get('id')) && !s.meta.get('id').equals(''))
52860 return s.id
52861 if (this.identityMap.has(s)) return this.identityMap.get(s)
52862 const o = new Su.Om(this.generateId())
52863 return (this.identityMap.set(s, o), o)
52864 }
52865 forget(s) {
52866 return !!this.identityMap.has(s) && (this.identityMap.delete(s), !0)

Callers 7

ReferenceElementMethod · 0.80
PathItemElementMethod · 0.80
LinkElementMethod · 0.80
SchemaElementMethod · 0.80
ReferenceElementMethod · 0.80
PathItemElementMethod · 0.80
SchemaElementMethod · 0.80

Calls 8

generateIdMethod · 0.95
juFunction · 0.85
hasKeyMethod · 0.80
equalsMethod · 0.80
getMethod · 0.65
CuFunction · 0.50
hasMethod · 0.45
setMethod · 0.45

Tested by

no test coverage detected