Java Code Examples for com.taobao.tddl.dbsync.binlog.LogEvent#MYSQL_TYPE_GEOMETRY
The following examples show how to use
com.taobao.tddl.dbsync.binlog.LogEvent#MYSQL_TYPE_GEOMETRY .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: TableMapLogEvent.java From canal-1.1.3 with Apache License 2.0 | 6 votes |
private void parse_geometry_type(LogBuffer buffer, int length) { // stores geometry column's types extracted from field. int limit = buffer.position() + length; List<Integer> datas = new ArrayList<Integer>(); while (buffer.hasRemaining() && buffer.position() < limit) { int col_type = (int) buffer.getPackedLong(); datas.add(col_type); } int index = 0; for (int i = 0; i < columnCnt; i++) { if (columnInfo[i].type == LogEvent.MYSQL_TYPE_GEOMETRY) { columnInfo[i].geoType = datas.get(index); index++; } } }
Example 2
Source File: TableMapLogEvent.java From canal with Apache License 2.0 | 6 votes |
private void parse_geometry_type(LogBuffer buffer, int length) { // stores geometry column's types extracted from field. int limit = buffer.position() + length; List<Integer> datas = new ArrayList<Integer>(); while (buffer.hasRemaining() && buffer.position() < limit) { int col_type = (int) buffer.getPackedLong(); datas.add(col_type); } int index = 0; for (int i = 0; i < columnCnt; i++) { if (columnInfo[i].type == LogEvent.MYSQL_TYPE_GEOMETRY) { columnInfo[i].geoType = datas.get(index); index++; } } }