-
-
Notifications
You must be signed in to change notification settings - Fork 371
Add Oracle Database support and update Spanish documentation #855
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
abc7aee
24150e6
28cb3c8
aa40350
c6a2aa1
db0c480
e1a0581
9054bb2
0424146
81b5527
b3835ff
ccdfb2e
7d53dce
716818f
7bc9fc1
e987b95
cb395a8
c8f3441
3bece92
f920e59
ad60ccf
829d49f
53dbc63
a40ed23
ef51d9a
1908ef7
cae81cd
e6b31fb
3dbc5cb
25f2c41
45c7ebb
56e3ec6
819ccb4
434f45c
d54e31d
5fabe76
f71508d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3,7 +3,7 @@ title: Connecting to a Database | |
| layout: page | ||
| --- | ||
|
|
||
| GORM officially supports the databases MySQL, PostgreSQL, GaussDB, SQLite, SQL Server, and TiDB | ||
| GORM officially supports the databases MySQL, PostgreSQL, GaussDB, SQLite, SQL Server TiDB, and Oracle Database | ||
|
|
||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [Documentation] Add missing comma: "SQL Server, TiDB" Context for Agents |
||
| ## MySQL | ||
|
|
||
|
|
@@ -180,6 +180,33 @@ gormDB, err := gorm.Open(gaussdb.New(gaussdb.Config{ | |
| Conn: sqlDB, | ||
| }), &gorm.Config{}) | ||
| ``` | ||
| ## Oracle Database | ||
| The GORM Driver for Oracle provides support for Oracle databases, enabling full compatibility with GORM's ORM capabilities. It is built on top of the [Go Driver for Oracle (Godror)](https://github.com/godror/godror) and supports key features such as auto migrations, associations, transactions, and advanced querying. | ||
|
|
||
| ### Prerequisite: Install Instant Client | ||
| To use ODPI-C with Godror, you’ll need to install the Oracle Instant Client on your system. | ||
|
|
||
| Follow the steps on [this page](https://odpi-c.readthedocs.io/en/latest/user_guide/installation.html) to complete the installation. | ||
|
|
||
| After that, use a logfmt-encoded parameter list to specify the instant client directory in the `dataSourceName` when you connect to the database. For example: | ||
|
|
||
| ```go | ||
| dsn := `user="scott" password="tiger" | ||
| connectString="[host]:[port]/cdb1_pdb1.regress.rdbms.dev.us.oracle.com" | ||
| libDir="/Path/to/your/instantclient_23_8"` | ||
| ``` | ||
| ### Getting Started | ||
| ```go | ||
| import ( | ||
| "github.com/oracle-samples/gorm-oracle/oracle" | ||
| "gorm.io/gorm" | ||
| ) | ||
|
|
||
| dsn := `user="scott" password="tiger" | ||
| connectString="[host]:[port]/cdb1_pdb1.regress.rdbms.dev.us.oracle.com" | ||
| libDir="/Path/to/your/instantclient_23_8"` | ||
| db, err := gorm.Open(oracle.Open(dsn), &gorm.Config{}) | ||
| ``` | ||
|
|
||
| ## SQLite | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3,7 +3,7 @@ title: Connecting to a Database | |
| layout: page | ||
| --- | ||
|
|
||
| GORM officially supports the databases MySQL, PostgreSQL, GaussDB, SQLite, SQL Server, and TiDB | ||
| GORM officially supports the databases MySQL, PostgreSQL, GaussDB, SQLite, SQL Server TiDB, and Oracle Database | ||
|
|
||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [Documentation] Add missing comma: "SQL Server, TiDB" Context for Agents |
||
| ## MySQL | ||
|
|
||
|
|
@@ -180,6 +180,33 @@ gormDB, err := gorm.Open(gaussdb.New(gaussdb.Config{ | |
| Conn: sqlDB, | ||
| }), &gorm.Config{}) | ||
| ``` | ||
| ## Oracle Database | ||
| The GORM Driver for Oracle provides support for Oracle databases, enabling full compatibility with GORM's ORM capabilities. It is built on top of the [Go Driver for Oracle (Godror)](https://github.com/godror/godror) and supports key features such as auto migrations, associations, transactions, and advanced querying. | ||
|
|
||
| ### Prerequisite: Install Instant Client | ||
| To use ODPI-C with Godror, you’ll need to install the Oracle Instant Client on your system. | ||
|
|
||
| Follow the steps on [this page](https://odpi-c.readthedocs.io/en/latest/user_guide/installation.html) to complete the installation. | ||
|
|
||
| After that, use a logfmt-encoded parameter list to specify the instant client directory in the `dataSourceName` when you connect to the database. For example: | ||
|
|
||
| ```go | ||
| dsn := `user="scott" password="tiger" | ||
| connectString="[host]:[port]/cdb1_pdb1.regress.rdbms.dev.us.oracle.com" | ||
| libDir="/Path/to/your/instantclient_23_8"` | ||
| ``` | ||
| ### Getting Started | ||
| ```go | ||
| import ( | ||
| "github.com/oracle-samples/gorm-oracle/oracle" | ||
| "gorm.io/gorm" | ||
| ) | ||
|
|
||
| dsn := `user="scott" password="tiger" | ||
| connectString="[host]:[port]/cdb1_pdb1.regress.rdbms.dev.us.oracle.com" | ||
| libDir="/Path/to/your/instantclient_23_8"` | ||
| db, err := gorm.Open(oracle.Open(dsn), &gorm.Config{}) | ||
| ``` | ||
|
|
||
| ## SQLite | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3,7 +3,7 @@ title: Connecting to a Database | |
| layout: page | ||
| --- | ||
|
|
||
| GORM officially supports the databases MySQL, PostgreSQL, GaussDB, SQLite, SQL Server, and TiDB | ||
| GORM officially supports the databases MySQL, PostgreSQL, GaussDB, SQLite, SQL Server TiDB, and Oracle Database | ||
|
|
||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [Documentation] Add missing comma: "SQL Server, TiDB" Context for Agents |
||
| ## MySQL | ||
|
|
||
|
|
@@ -182,6 +182,33 @@ gormDB, err := gorm.Open(gaussdb.New(gaussdb.Config{ | |
| Conn: sqlDB, | ||
| }), &gorm.Config{}) | ||
| ``` | ||
| ## Oracle Database | ||
| The GORM Driver for Oracle provides support for Oracle databases, enabling full compatibility with GORM's ORM capabilities. It is built on top of the [Go Driver for Oracle (Godror)](https://github.com/godror/godror) and supports key features such as auto migrations, associations, transactions, and advanced querying. | ||
|
|
||
| ### Prerequisite: Install Instant Client | ||
| To use ODPI-C with Godror, you’ll need to install the Oracle Instant Client on your system. | ||
|
|
||
| Follow the steps on [this page](https://odpi-c.readthedocs.io/en/latest/user_guide/installation.html) to complete the installation. | ||
|
|
||
| After that, use a logfmt-encoded parameter list to specify the instant client directory in the `dataSourceName` when you connect to the database. For example: | ||
|
|
||
| ```go | ||
| dsn := `user="scott" password="tiger" | ||
| connectString="[host]:[port]/cdb1_pdb1.regress.rdbms.dev.us.oracle.com" | ||
| libDir="/Path/to/your/instantclient_23_8"` | ||
| ``` | ||
| ### Getting Started | ||
| ```go | ||
| import ( | ||
| "github.com/oracle-samples/gorm-oracle/oracle" | ||
| "gorm.io/gorm" | ||
| ) | ||
|
|
||
| dsn := `user="scott" password="tiger" | ||
| connectString="[host]:[port]/cdb1_pdb1.regress.rdbms.dev.us.oracle.com" | ||
| libDir="/Path/to/your/instantclient_23_8"` | ||
| db, err := gorm.Open(oracle.Open(dsn), &gorm.Config{}) | ||
| ``` | ||
|
|
||
| ## SQLite | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -5,7 +5,7 @@ layout: página | |
|
|
||
| ## <span id="smart_select">Campos de selección inteligentes</span> | ||
|
|
||
| In GORM, you can efficiently select specific fields using the [`Select`](query.html) method. This is particularly useful when dealing with large models but requiring only a subset of fields, especially in API responses. | ||
| In GORM, you can efficiently select specific fields using the [`Select`](query.html) method. . | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [Documentation] Remove the extraneous period; change "method. ." to "method." Context for Agents |
||
|
|
||
| ```go | ||
| type User struct { | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3,7 +3,7 @@ title: Conectarse a una base de datos | |
| layout: page | ||
| --- | ||
|
|
||
| GORM officially supports the databases MySQL, PostgreSQL, GaussDB, SQLite, SQL Server, and TiDB | ||
| GORM officially supports the databases MySQL, PostgreSQL, GaussDB, SQLite, SQL Server TiDB, and Oracle Database | ||
|
|
||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [Documentation] Add missing comma: "SQL Server, TiDB" Context for Agents |
||
| ## MySQL | ||
|
|
||
|
|
@@ -180,6 +180,33 @@ gormDB, err := gorm.Open(gaussdb.New(gaussdb.Config{ | |
| Conn: sqlDB, | ||
| }), &gorm.Config{}) | ||
| ``` | ||
| ## Oracle Database | ||
| The GORM Driver for Oracle provides support for Oracle databases, enabling full compatibility with GORM's ORM capabilities. It is built on top of the [Go Driver for Oracle (Godror)](https://github.com/godror/godror) and supports key features such as auto migrations, associations, transactions, and advanced querying. | ||
|
|
||
| ### Prerequisite: Install Instant Client | ||
| To use ODPI-C with Godror, you’ll need to install the Oracle Instant Client on your system. | ||
|
|
||
| Follow the steps on [this page](https://odpi-c.readthedocs.io/en/latest/user_guide/installation.html) to complete the installation. | ||
|
|
||
| After that, use a logfmt-encoded parameter list to specify the instant client directory in the `dataSourceName` when you connect to the database. For example: | ||
|
|
||
| ```go | ||
| dsn := `user="scott" password="tiger" | ||
| connectString="[host]:[port]/cdb1_pdb1.regress.rdbms.dev.us.oracle.com" | ||
| libDir="/Path/to/your/instantclient_23_8"` | ||
| ``` | ||
| ### Getting Started | ||
| ```go | ||
| import ( | ||
| "github.com/oracle-samples/gorm-oracle/oracle" | ||
| "gorm.io/gorm" | ||
| ) | ||
|
|
||
| dsn := `user="scott" password="tiger" | ||
| connectString="[host]:[port]/cdb1_pdb1.regress.rdbms.dev.us.oracle.com" | ||
| libDir="/Path/to/your/instantclient_23_8"` | ||
| db, err := gorm.Open(oracle.Open(dsn), &gorm.Config{}) | ||
| ``` | ||
|
|
||
| ## SQLite | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3,7 +3,7 @@ title: Connecting to a Database | |
| layout: page | ||
| --- | ||
|
|
||
| GORM officially supports the databases MySQL, PostgreSQL, GaussDB, SQLite, SQL Server, and TiDB | ||
| GORM officially supports the databases MySQL, PostgreSQL, GaussDB, SQLite, SQL Server TiDB, and Oracle Database | ||
|
|
||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [Documentation] Add missing comma: "SQL Server, TiDB" Context for Agents |
||
| ## MySQL | ||
|
|
||
|
|
@@ -180,6 +180,33 @@ gormDB, err := gorm.Open(gaussdb.New(gaussdb.Config{ | |
| Conn: sqlDB, | ||
| }), &gorm.Config{}) | ||
| ``` | ||
| ## Oracle Database | ||
| The GORM Driver for Oracle provides support for Oracle databases, enabling full compatibility with GORM's ORM capabilities. It is built on top of the [Go Driver for Oracle (Godror)](https://github.com/godror/godror) and supports key features such as auto migrations, associations, transactions, and advanced querying. | ||
|
|
||
| ### Prerequisite: Install Instant Client | ||
| To use ODPI-C with Godror, you’ll need to install the Oracle Instant Client on your system. | ||
|
|
||
| Follow the steps on [this page](https://odpi-c.readthedocs.io/en/latest/user_guide/installation.html) to complete the installation. | ||
|
|
||
| After that, use a logfmt-encoded parameter list to specify the instant client directory in the `dataSourceName` when you connect to the database. For example: | ||
|
|
||
| ```go | ||
| dsn := `user="scott" password="tiger" | ||
| connectString="[host]:[port]/cdb1_pdb1.regress.rdbms.dev.us.oracle.com" | ||
| libDir="/Path/to/your/instantclient_23_8"` | ||
| ``` | ||
| ### Getting Started | ||
| ```go | ||
| import ( | ||
| "github.com/oracle-samples/gorm-oracle/oracle" | ||
| "gorm.io/gorm" | ||
| ) | ||
|
|
||
| dsn := `user="scott" password="tiger" | ||
| connectString="[host]:[port]/cdb1_pdb1.regress.rdbms.dev.us.oracle.com" | ||
| libDir="/Path/to/your/instantclient_23_8"` | ||
| db, err := gorm.Open(oracle.Open(dsn), &gorm.Config{}) | ||
| ``` | ||
|
|
||
| ## SQLite | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[Documentation]
Add missing comma: "SQL Server, TiDB"
Context for Agents