com.mckoi.database.jdbc

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Database DBMS » mckoi » com.mckoi.database.jdbc 
com.mckoi.database.jdbc
com.mckoi.database.jdbc - JDBC interface to Mckoi

The JDBC interface to Mckoi.

Establishing a Connection

An application establishes a JDBC Connection by calling java.sql.DriverManager.getConnection(String url, Properties info). DriverManager.getConnection calls java.sql.Driver.connect, which figures out that the URL is a Mckoi URL, so calls com.mckoi.database.jdbc.MDriver, which was registered by a static initializer in com.mckoi.JDBCDriver.

If the URL is local (embedded mode), MDriver creates an instance of com.mckoi.database.jdbcserver.LocalDatabaseInterface, which in turns creates and wraps up an instance of com.mckoi.database.jdbcserver.JDBCDatabaseInterface, and calls its connectToJVM method to initialize it.

If the URL is remote (client/server mode), MDriver creates an instance of TCPStreamDatabaseInterface and calls its connectToDatabase method in order to establish a TCP connection to the Mckoi database server. For more information on how the server handles connections, see the package com.mckoi.database.jdbcserver.

In either case, the resulting DatabaseInterface is wrapped up in a MConnection, and returned to the application as an instance of java.sql.Connection.

Executing a Query

When an application calls java.sql.Connection.createStatement() on its MConnection, it gets back an instance of MStatement, which carries a pointer to the MConnection.

When the application calls java.sql.Statement.executeQuery(String) on its MStatement, Mckoi creates an SQLQuery from the String, creates an empty MResultSet, then calls MStatement.executeQuery with those two objects. MStatement.executeQuery turns around and calls Mconnection.executeQuery, which calls execQuery on its DatabaseInterface. Depending on whether the connection is local or remote, this call is either to com.mckoi.database.jdbcserver.LocalDatabaseInterface.execQuery for local connections, or to RemoteDatabaseInterface.execQuery for remote connections. These are described more fully in the package description for com.mckoi.database.jdbcserver under Local Queries and Remote Queries.

Java Source File NameTypeComment
AbstractStreamableObject.javaClass An abstract class that provides various convenience behaviour for creating streamable java.sql.Blob and java.sql.Clob classes.
AsciiInputStream.javaClass An InputStream that converts a Reader to a plain ascii stream.
AsciiReader.javaClass A java.io.Reader implementation that wraps around an ascii input stream (8-bit per char stream).
BinaryToUnicodeReader.javaClass A Reader implementation that wraps around a unicode encoded input stream that encodes each unicode character as 2 bytes.
DatabaseCallBack.javaInterface An interface that is input to the DatabaseInterface as a way to be notified of event information from inside the database.
DatabaseInterface.javaInterface The interface with the Database whether it be remotely via TCP/IP or locally within the current JVM.
LocalBootable.javaInterface An interface that is implemented by an object that boots up the database.
MBlob.javaClass An implementation of an sql.Blob object.
MckoiConnection.javaClass Wraps a Connection and provides Mckoi specific extensions that are outside the JDBC specification.

Example,

 Connection connection = java.sql.DriverManager.getConnection( ....
MClob.javaClass An implementation of java.sql.Clob over a java.util.String object.
MConnection.javaClass JDBC implementation of the connection object to a Mckoi database.
MDatabaseMetaData.javaClass An implementation of JDBC's DatabaseMetaData.
MDriver.javaClass JDBC implementation of the driver for the Mckoi database.

The url protocol is as follows:

 For connecting to a remote database server:
 jdbc:mckoi:[//hostname[:portnum]/][schema_name/]
 eg.
MPreparedStatement.javaClass An implementation of a JDBC prepared statement. Multi-threaded issue: This class is not designed to be multi-thread safe.
MResultSet.javaClass Implementation of a ResultSet.

Multi-threaded issue: This class is not designed to be multi-thread safe.

MResultSetMetaData.javaClass An implementation of JDBC's ResultSetmetaData.
MSQLException.javaClass SQLException used by the McKoi database engine.
MStatement.javaClass An implementation of JDBC Statement.

Multi-threaded issue: This class is not designed to be multi-thread safe.

MStreamableBlob.javaClass A Blob that is a large object that may be streamed from the server directly to this object.
MStreamableClob.javaClass A Clob that is a large object that may be streamed from the server directly to this object.
ProtocolConstants.javaInterface Constants used in the JDBC database communication protocol.
QueryResponse.javaInterface The response to a query executed via the 'execQuery' method in the DatabaseInterface interface.
RemoteDatabaseInterface.javaClass An abstract implementation of DatabaseInterface that retrieves information from a remote server host.
ResultPart.javaClass A container class that holds a part of a result set.
RowCache.javaClass A Cache that stores rows retrieved from the server in result set's.
SQLLoginException.javaClass An SQLException that signifies username/password authentication failed.
SQLQuery.javaClass Represents an SQL Query to the database.
StreamableObjectPart.javaClass Represents a response from the server for a section of a streamable object.
StreamDatabaseInterface.javaClass An stream implementation of an interface to a McKoi database.
TCPStreamDatabaseInterface.javaClass Connection to the database via the TCP protocol.
TriggerListener.javaInterface A listener that is notified when the trigger being listened to is fired.
UnicodeToBinaryStream.javaClass An object that wraps around a Reader and translates the unicode stream into a stream of bytes that the database is able to transfer to the database. This object simply converts each char from the Reader into two bytes.
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.