由于某些原因,我需要修补 oracle 增强适配器。
在我的 oracle_enhanced_adapter.rb 文件中,我需要获取 OCI8::Object::Mdsys::SdoGeometry.new 返回值,但它返回未初始化的常量OCI8::Object::Mdsys::SdoGeometry。
但是,如果在执行 OCI8::Object::Mdsys::SdoGeometry.new 命令之前,我执行 OnlineGpsPoint.first 命令(OnlineGpsPoint 包含一个 sdo_geometry 列)并获取表中的一行 OCI8::Object::Mdsys: :SdoGeometry 将被初始化。
问题是我不想在我的程序中硬编码'OnlineGpsPoint'。我只需要 OCI8::Object::Mdsys::SdoGeometry 值。
有没有解决疼痛的办法?