SQL Record Manager #25692
Replies: 4 comments 2 replies
-
Hey @Hanson-G2G! I'm here to help you with your SQL Record Manager question. I can assist with bugs, answer questions, and guide you on becoming a contributor. Yes, you can use other SQL databases with Given the flexibility of SQLAlchemy, you can adapt For example, to use MySQL, you would need to adjust the dialect-specific parts of the code and ensure you have the appropriate SQLAlchemy dialect installed (e.g., Here is a brief example of how you might adapt the def get_time(self) -> float:
"""Get the current server time as a timestamp."""
with self._make_session() as session:
if self.dialect == "sqlite":
query = text("SELECT (julianday('now') - 2440587.5) * 86400.0;")
elif self.dialect == "postgresql":
query = text("SELECT EXTRACT (EPOCH FROM CURRENT_TIMESTAMP);")
elif self.dialect == "mysql":
query = text("SELECT UNIX_TIMESTAMP();")
else:
raise NotImplementedError(f"Not implemented for dialect {self.dialect}")
dt = session.execute(query).scalar()
if isinstance(dt, decimal.Decimal):
dt = float(dt)
if not isinstance(dt, float):
raise AssertionError(f"Unexpected type for datetime: {type(dt)}")
return dt For the best option, it depends on your specific requirements and environment. PostgreSQL is often recommended for its robustness and feature set, but MySQL is also a solid choice, especially if you are already using it in your infrastructure. Additionally, the |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
how to configure AWS memorydb with SQL Record Manager? |
Beta Was this translation helpful? Give feedback.
-
I found that there are two "RecordManager", one is |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Checked other resources
Commit to Help
Example Code
Description
Other than Postgresql, can i use other SQL database?
If there is, can you recommend the best option for database.
Thank you.
System Info
langchain @ file:///home/conda/feedstock_root/build_artifacts/langchain_1723704336486/work
langchain-anthropic==0.1.23
langchain-aws==0.1.17
langchain-chroma==0.1.3
langchain-community @ file:///home/conda/feedstock_root/build_artifacts/langchain-community_1723666199257/work
langchain-core @ file:///home/conda/feedstock_root/build_artifacts/langchain-core_1724271138945/work
langchain-groq==0.1.9
langchain-openai @ file:///home/conda/feedstock_root/build_artifacts/langchain-openai_1723862080855/work
langchain-text-splitters @ file:///home/conda/feedstock_root/build_artifacts/langchain-text-splitters_1719389695345/work
langchain-voyageai==0.1.1
Beta Was this translation helpful? Give feedback.
All reactions