HexaCluster LogoHexaCluster Logo
  • Services
  • Products
  • HexaRocket
  • Blog
  • Resources
  • Company
  • Contact Us
Schedule a Demo
Stay Updated

Subscribe to Newsletters

Be the first to know! Stay updated with the latest insights, database migration benchmarks, and technical updates from HexaCluster.

HexaCluster LogoHexaCluster Logo

Enterprise-grade Database migration, modernization, and tooling for teams moving off legacy databases.

  • One Dundas Street West, Suite 2500, Toronto, Ontario, M5G 1Z3, Canada
  • HexaCluster DMCC, Plot No: JLT-PH2-RET-R6 Jumeirah Lakes Towers, Dubai, UAE
connect@hexacluster.ai+1 (902) 221-5976

Security & Compliance

SOC 2 Type 1 reportSOC 2 Type 2 report, monitored by Comp AIGDPR compliantISO 27001AICPA SOC for Service Organizations

Products

  • DMAT
  • HexaRocket
  • HexaBridge
  • HexaTranspile
  • MyBatis2Pg
  • HexaReplicate
  • Download Products

HexaRocket

  • Supported Database Migrations
  • Migrate to Yugabyte
  • About HexaRocket
  • Migrate to Oracle
  • Migrate to PostgreSQL
  • Migrate to MariaDB

Services

  • Database Migration to PostgreSQL
  • Application Migration and Modernization
  • AI/ML and MLOps
  • Architectural Health Audit
  • Managed DBA Services
  • Performance Tuning
  • PostgreSQL Development
  • Training for DBAs & Developers
  • 24/7 Support
  • Supported Tools and Extensions

Company

  • Blog
  • Case Studies
  • Webinars
  • Announcements
  • About Us
  • Referral Program
  • Events
  • Contact Us

© HexaCluster 2026. All rights reserved. Privacy PolicyThis site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

HEXACLUSTERHEXACLUSTERHEXACLUSTER

Announcing First Pure-Go CUBRID Driver: gocubrid

Suman Michael
Jun 16, 2026
golangDMATGo+1 more#CUBRID Driver#CUBRID#Go+1 more

Announcing First Pure-Go CUBRID Driver: gocubrid

gocubrid is the first pure-Go CUBRID driver: a CUBRID Go driver that speaks the CAS broker wire protocol natively, with zero cgo and nothing beyond the Go standard library.

gocubrid

It registers as a standard database/sql driver, so adopting this CUBRID database driver takes a single import, and it is built for CUBRID migration work where static, portable binaries matter. gocubrid changes one thing fundamentally: no C toolchain, no CCI shared libraries, just go get and build.

go get github.com/hexacluster/gocubrid

Go 1.24+ | No CGO/C-libs | Zero dependencies | BSD-3-Clause

Why a new driver

Sometimes innovation comes from a requirement, and gocubrid is no exception. It started with a customer request: add CUBRID to DMAT, HexaCluster's migration assessment tool that analyzes how hard it is to migrate away from databases like Oracle, SQL Server, MySQL, and MariaDB. Supporting CUBRID meant talking to it from Go, and the only option was the cgo-based CUBRID/cubrid-go driver.

That driver fought us at every turn: performance bottlenecks, unreliable result-metadata extraction, and a build pipeline that had to drag the CUBRID client libraries through every CI/CD stage. The native dependencies made DMAT painful to build and run across operating systems, and getting a cgo CUBRID app working on macOS and Windows was a nightmare. Worst of all, DMAT is meant to run in air-gapped environments, yet the driver still demanded libcascci.so on the machine. To get out from under all of that, we wrote a pure-Go CUBRID driver.

The problem is structural: cubrid-go wraps the CCI C client library through cgo, and that single fact ripples through your whole pipeline: a C toolchain to build, the CUBRID client shared libraries (libcascci.so and friends) on every host, and a binary you cannot cross-compile. A pure-Go CUBRID driver pays off at each of those steps.

  • Simpler CI/CD. Delete the "install CUBRID client libraries" step from your Dockerfiles and build agents. go build is the entire toolchain, so your pipeline has one fewer system dependency to pin, cache, and break on.
  • Smaller, safer images. Pure Go builds into scratch or distroless. No client libraries ride along, so images are smaller, pull faster, and carry a smaller attack surface to audit and patch.
  • Cross-compile from anywhere. Build linux/amd64 from an Apple-silicon laptop, or target arm64, by setting GOOS and GOARCH. No C cross-toolchain, no per-arch build host.
  • Faster onboarding. A new engineer clones the repo, runs go get, and builds. No system packages, no LD_LIBRARY_PATH, no client-library version drift between someone's laptop and production.
  • Timeouts that free resources. Every network call honors context.Context. When a request is cancelled or times out, the driver unwinds and releases the goroutine instead of blocking inside a C call you cannot interrupt.

Migrating from cubrid-go

Both drivers register the same database/sql name, "cubrid", so migrating is two edits: the blank import and the DSN.

Before, with CUBRID/cubrid-go:

import (
    "database/sql"

    _ "github.com/CUBRID/cubrid-go"
)

db, err := sql.Open("cubrid", "cci:CUBRID:host:33000:demodb:user:password:")

After, with gocubrid:

import (
    "database/sql"

    _ "github.com/hexacluster/gocubrid"
)

db, err := sql.Open("cubrid", "cubrid://user:password@host:33000/demodb")

Your queries, Rows, Result, and connection pooling are unchanged. Server and broker errors now surface as a typed *cubrid.Error you can match with errors.As.

The build changes the most. cgo disappears, and so does everything it dragged into your image:

Before:

# the CUBRID client libraries are needed to compile AND at runtime
ENV CGO_CFLAGS="-I$CUBRID/include"
ENV CGO_LDFLAGS="-L$CUBRID/lib -lcascci -lnsl -lpthread -lrt"
RUN go build -o /app .
# the runtime image must still ship libcascci.so and friends

After:

RUN CGO_ENABLED=0 go build -o /app .
# final stage can be FROM scratch: COPY --from=build /app /app

Before you migrate, skim the README's features and limitations.


HexaRocket

⚡ Automated Schema Conversion

Near 100% automated conversion for enterprise databases including Oracle, SQL Server, MySQL, MariaDB, DB2, Cassandra and PostgreSQL.

Procedures Functions Triggers Validation
Explore HexaRocket
CDC & Replication

🔄 Real-Time Data Movement

Zero-lag CDC replication with better visibility, simplified configuration, and enterprise-grade monitoring.

Zero Lag CDC Monitoring Cutover Rollback
Learn More
Migration Platform

🚀 End-to-End Modernization

Assessment, schema conversion, replication, rollback, and migration visibility - all from one platform.

Assessment Rollback Validation Automation
Explore HexaCluster Products

When database/sql is not enough

Underneath the adapter sits the native cubrid package: one *cubrid.Conn is one socket (not goroutine-safe by contract, since pooling is the adapter's job), and it exposes the full broker protocol. The wire behavior was implemented against the BSD-licensed CUBRID JDBC driver as a protocol reference.

  • Schema introspection - typed catalog helpers for tables, columns, primary keys, imported and exported keys, and indexes. Exactly what migration and tooling code reaches for.
  • LOB streaming - BLOB and CLOB locators with chunked reads and appends, transaction-scoped, never buffering the whole value.
  • Single round-trip batches - many statements in one round trip; per-row errors stay isolated and the server keeps going past a failed row.
  • Savepoints and isolation - named savepoints, read-committed / repeatable-read / serializable isolation, and a configurable lock timeout.
  • Stored procedures - CALL with scalar OUT and INOUT parameters you register and read back.
  • Collections and exact decimals - SET, MULTISET, and SEQUENCE map to []any; NUMERIC scans exactly, with no float rounding.
  • HA failover and TLS - standby brokers tried in order after the primary, and an optional TLS upgrade for the broker connection.
cfg, _ := cubrid.ParseDSN(dsn)
conn, _ := cubrid.Connect(ctx, cfg)
idxs, _ := conn.Indexes(ctx, "athlete") // typed schema introspection

Runnable, compile-checked examples live in the repository.

How it compares

gocubridCUBRID/cubrid-go
Implementationpure Go, native CAS wire protocolcgo wrapper over the CCI C library
Build-time C toolchainnot neededrequired (cgo + CCI headers)
Runtime shared librarynonelibcascci.so on every host
CGO_ENABLED=0 static binariesyesno
Cross-compilationany GOOS/GOARCHtied to the host C toolchain
Dependenciesstandard library onlyCUBRID CCI client libraries
Schema introspectiontyped helpersraw catalog SQL only
LOB / BLOB / CLOBchunked streaming locatorsmaterialized as a string
Batch executionone round trip per batchper-statement round trips
Stored procedure OUT paramsyesnot exposed

cubrid-go can still reach HA failover and TLS through the CCI connection string, and isolation or savepoints through raw SQL; the difference is whether the CUBRID Go driver gives you a typed API for it. The cubrid-go column reflects its public documentation (last released December 2022).

Proven where it counts

gocubrid advertises broker protocol V12 and gates features at runtime on what the broker negotiates, so there are no per-version code forks. The integration suite runs live against five releases: CUBRID 9.3.9, 10.1.8, 10.2.18, 11.0.16, and 11.4.5 (the primary target, where SSL and Java stored procedures are also verified).

The wire protocol code is tested at every level, from fully controlled unit tests to adversarial stress: codec tests against byte-exact fake brokers, golden wire frames captured from every live version and replayed offline, a race-enabled pool storm with a 100k-row streaming fetch and broker-restart recovery, and native fuzzing of every parser seeded from those golden frames.

gocubrid is open source under BSD-3-Clause. It is built and maintained by HexaCluster, where it backs our database migration services and broader commercial-to-open-source database migration work. Issues and contributions are welcome.

Get started

go get github.com/hexacluster/gocubrid
  • Source and issues: https://github.com/hexacluster/gocubrid
  • API docs: https://pkg.go.dev/github.com/hexacluster/gocubrid
  • README: https://github.com/hexacluster/gocubrid/blob/dev/README.md

If you need expert support migrating legacy or complex Oracle, SQL Server, MySQL, MariaDB, DB2, Sybase ASE, or Cassandra databases to PostgreSQL or distributed databases, we’re here to help.

HexaCluster provides end-to-end migration and modernization services, including application migration and modernization, database migration, and PostgreSQL consulting such as performance tuning, health audits, managed DBA services, and 24/7/365 support.

To start a conversation or explore how we can support your migration journey, please contact us at connect@hexacluster.ai


Subscribe to our Newsletters and Stay tuned for more interesting topics.


Authors

Suman Michael

Suman Michael

Technical Director - R&D

Suman Michael, Technical Director for R&D at HexaCluster, with a focus on machine learning (ML), deep learning (DL), and generative AI (GenAI), brings a wealth of expertise to the table. With a mastery of languages such as C, Go, Rust, Java, Python, and JavaScript, he excels in crafting robust, data-intensive, and concurrent systems. Michael’s proficiency extends to PostgreSQL development and administration, showcasing his well-rounded technical prowess. A devoted advocate of open source, he remains actively engaged in contributing to its community, further enriching the collaborative landscape of technology.

Start your migration journey 🚀

start your migration journey with our expert team

Products

DMAT

Database & Application Migration Assessment Tool

HexaRocket

End-to-End Database Migration & Modernization Tool

HexaTranspile

Database Code Object Conversion to PostgreSQL

MyBatis2Pg

MyBatis Mapper Conversion to PostgreSQL

HexaReplicate

Enterprise Data Replication & Live CDC

HexaBridge

Oracle Compatibility Layer for PostgreSQL

HexaRocket 🚀

Oracle to PostgreSQLSQL Server to PostgreSQLMySQL to PostgreSQLMariaDB to PostgreSQLAny to Any databases

Migration Services

Database MigrationsApplication Modernization

PostgreSQL Consulting

Architectural AuditsPerformance TuningTraining & Support