 bbfd9ce136
			
		
	
	bbfd9ce136
	
	
	
		
			
			Using the same implementation of the Backend and SessionCommand classes in both schemarouter and readwritesplit will prevent duplication of code. This commit only splits the generic parts of the class to a Backend class which the schemarouter then extends. The session commands for both routers are similar so they require no special handling.
		
			
				
	
	
		
			29 lines
		
	
	
		
			570 B
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			29 lines
		
	
	
		
			570 B
		
	
	
	
		
			C++
		
	
	
	
	
	
| /*
 | |
|  * Copyright (c) 2016 MariaDB Corporation Ab
 | |
|  *
 | |
|  * Use of this software is governed by the Business Source License included
 | |
|  * in the LICENSE.TXT file and at www.mariadb.com/bsl11.
 | |
|  *
 | |
|  * Change Date: 2020-01-01
 | |
|  *
 | |
|  * On the date above, in accordance with the Business Source License, use
 | |
|  * of this software will be governed by version 2 or later of the General
 | |
|  * Public License.
 | |
|  */
 | |
| 
 | |
| #include "schemarouter.hh"
 | |
| 
 | |
| namespace schemarouter
 | |
| {
 | |
| 
 | |
| void SRBackend::set_mapped(bool value)
 | |
| {
 | |
|     m_mapped = value;
 | |
| }
 | |
| 
 | |
| bool SRBackend::is_mapped() const
 | |
| {
 | |
|     return m_mapped;
 | |
| }
 | |
| 
 | |
| } |